Skip to content

Archive this repo

Archive this repo #88

Workflow file for this run

name: Release
on:
push:
branches:
- master
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.18
id: go
- 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: GO vet
run: make vet
- 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: 18
- name: Add execution plugin
run: npm install @semantic-release/exec
- name: Release to GitHub
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx semantic-release