Update Go setup action to version 4 #42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tag, Release and Upload | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| Release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
| - name: Bump version and push tag | |
| id: tag_release | |
| uses: anothrNick/github-tag-action@1.67.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DEFAULT_BUMP: patch | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.tag_release.outputs.tag }} | |
| release_name: Release ${{ steps.tag_release.outputs.tag }} | |
| body: GitHub Actions Release | |
| draft: false | |
| prerelease: false | |
| - name: Set up Go 1.21 | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: 1.21 | |
| id: go | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.13" | |
| - name: Install cram | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install cram | |
| - name: Check out new tag into the Go module directory | |
| uses: actions/checkout@v2 | |
| with: | |
| ref: ${{ steps.tag_release.outputs.tag }} | |
| - name: Deps & Build | |
| shell: bash | |
| run: | | |
| export PATH=${PATH}:`go env GOPATH`/bin | |
| make build-deps | |
| make build | |
| - name: Upload binaries to release | |
| uses: svenstaro/upload-release-action@v1-release | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: buildenv-* | |
| tag: ${{ steps.tag_release.outputs.tag }} | |
| overwrite: true | |
| file_glob: true |