Skip to content

sqlutil

sqlutil #12

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
branches:
- master
paths:
- go.mod
- go.sum
- "**/*.go"
- "!**/*_test.go"
jobs:
release:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
show-progress: false
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache: false
- name: Quality checks
run: |
go vet ./...
go test ./...
- name: Get last tag
id: last
run: |
version=$(git describe --tags --abbrev=0)
version=${version#v}
echo "version=${version}" >> $GITHUB_OUTPUT
- id: next
uses: axatol/actions/increment-semver@release
with:
version: ${{ steps.last.outputs.version }}
- if: github.ref == 'refs/heads/master'
name: Push tag
run: |
version="v${{ steps.next.outputs.next-version }}"
git tag ${version}
git push -u origin ${version}