ci: add pb generation as dependency #14
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: | |
branches: | |
- main | |
jobs: | |
release: | |
name: 'Release to GitHub' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Go setup | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.22 | |
id: go | |
- name: Install protoc | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install protobuf-compiler protobuf-compiler-grpc | |
- name: Get dependencies | |
run: make get-dependencies | |
# Go test | |
- name: Ensure that all files are properly formatted | |
run: | | |
FILES=$(go run golang.org/x/tools/cmd/goimports@latest -w -l .) | |
if [ -n "${FILES}" ]; then | |
printf "Following files are not formatted: \n%s" "$FILES" | |
exit 1 | |
fi | |
- name: Test | |
run: make test | |
- name: Test building | |
run: make build | |
# Prepare release | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Add execution plugin | |
run: npm install @semantic-release/exec | |
- name: Release to GitHub | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: npx semantic-release |