Fix release workflow. #8
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: | |
push: | |
tags: ["*"] | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
permissions: | |
# allow creating releases | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- run: | | |
go version | |
go get | |
- run: make build | |
- working-directory: ./example/echo-server | |
run: make build | |
- name: Create release | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
TAG=$(git describe --tags --abbrev=0 HEAD) | |
LAST_TAG=$(git describe --tags --abbrev=0 HEAD^ || true) | |
[[ -n $LAST_TAG ]] && RANGE=$LAST_TAG..HEAD || RANGE=HEAD | |
RELEASE_NOTES=$(git log "$RANGE" --oneline --decorate) | |
gh release create --notes "$RELEASE_NOTES" "$TAG" \ | |
"./bin/*" \ | |
"./example/echo-server/bin/*" |