README #31
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 | |
permissions: | |
contents: write | |
pull-requests: write | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
release: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
go-version: ["1.23"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
cache: true | |
- name: Verify version | |
run: | | |
VERSION_FILE=$(cat cmd/gaze/version) | |
TAG_VERSION=${GITHUB_REF##*/} | |
if [ "$VERSION_FILE" != "$TAG_VERSION" ]; then | |
echo "Error: Version in version file ($VERSION_FILE) does not match tag version ($TAG_VERSION)" | |
exit 1 | |
fi | |
- name: Package | |
run: make package | |
- name: Upload | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: dist/*.zip | |
license: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
go-version: ["1.23"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
cache: true | |
- name: Install Licenses tool | |
run: go install github.com/google/go-licenses@latest | |
- name: License | |
run: | | |
go-licenses save ./... --save_path=license | |
go-licenses csv ./... | tee license/license.csv | |
zip -r ./license.zip ./license | |
- name: Upload | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: license.zip |