Prepare 1.2.0 release #3
Workflow file for this run
This file contains 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: Release | |
on: | |
pull_request: | |
types: [closed] | |
branches: ['main'] | |
paths: ['version'] | |
env: | |
GO_VERSION: 1.21.5 | |
DIST_DIR: dist | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go tools | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Retrieve version | |
shell: bash | |
run: | | |
echo "VERSION=$(cat version)" >> "$GITHUB_ENV" | |
- name: Generate distributables | |
shell: bash | |
run: ./dist.sh | |
- name: Create Git Tag | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "GitHub Bot" | |
git tag -a "${{ env.VERSION }}" -m "Version ${{ env.VERSION }}" | |
git push origin "${{ env.VERSION }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Github Release | |
uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e | |
with: | |
name: ${{ env.VERSION }} | |
tag: ${{ env.VERSION }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: ${{ env.DIST_DIR }}/* | |
generateReleaseNotes: true |