diff --git a/.github/workflows/go_on_release.yml b/.github/workflows/go_on_release.yml new file mode 100644 index 0000000000..5b219718b7 --- /dev/null +++ b/.github/workflows/go_on_release.yml @@ -0,0 +1,48 @@ +name: Publish go-client +on: + push: + tags: + - "v*" +env: + repo: windmill-go-client + +jobs: + build_go_and_push_to_repo: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: generate_go + run: | + cd go-client + rm .gitignore + ./build.sh + - name: Pushes to another repository + id: push_directory + uses: cpina/github-action-push-to-another-repository@devel + env: + API_TOKEN_GITHUB: ${{ secrets.DENO_PAT }} + with: + source-directory: go-client/ + destination-github-username: ${{ github.repository_owner }} + destination-repository-name: ${{ env.repo }} + user-email: ruben@windmill.dev + commit-message: See ORIGIN_COMMIT from $GITHUB_REF + target-branch: main + + tag_repo: + needs: [build_go_and_push_to_repo] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + repository: ${{ github.repository_owner }}/${{ env.repo }} + token: ${{ secrets.DENO_PAT }} + path: ./client + + - name: Push client + run: | + cd ./client + git config --global user.email "ruben@windmill.dev" + git config --global user.name "rubenfiszel[bot]" + git tag -a ${{ github.ref_name }} -m "${{ github.ref_name }}" + git push --tags diff --git a/go-client/go.mod b/go-client/go.mod index a64527c6bd..426875be6e 100644 --- a/go-client/go.mod +++ b/go-client/go.mod @@ -1,4 +1,4 @@ -module windmill +module github.com/windmill-labs/windmill-go-client go 1.19