Skip to content

Fix release workflow. #8

Fix release workflow.

Fix release workflow. #8

Workflow file for this run

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/*"