Skip to content

Merge pull request #139 from threez/ui #37

Merge pull request #139 from threez/ui

Merge pull request #139 from threez/ui #37

Workflow file for this run

name: release
on:
push:
branches: [master]
jobs:
goreleaser:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
id: vars
run: |
goVersion=$(grep '^FROM go' .github/go/Dockerfile | cut -d ' ' -f 2 | cut -d ':' -f 2)
echo "go_version=${goVersion}" >> $GITHUB_OUTPUT
echo "Using Go version ${goVersion}"
-
name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ steps.vars.outputs.go_version }}
- name: release dry run
run: make release-dry-run
- uses: go-semantic-release/action@v1
id: semantic
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Git config for tagging
if: steps.semantic.outputs.version != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
- name: Update tags
if: steps.semantic.outputs.version != ''
run: |
TAG=v${{ steps.semantic.outputs.version }}
git push origin :refs/tags/${TAG}
git tag -fa ${TAG} -m "release v${{ steps.semantic.outputs.version }}"
git push origin ${TAG}
- name: setup release environment
run: |-
echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env
- name: release publish
run: make release