Skip to content

Merge pull request #2 from vshn/fixes #1

Merge pull request #2 from vshn/fixes

Merge pull request #2 from vshn/fixes #1

Workflow file for this run

name: GoRelease
on:
push:
tags:
- 'v*.*.*'
env:
# Common versions
GO_VERSION: '1.19'
GO_REQUIRED_MIN_VERSION: ''
GITHUB_REF: ${{ github.ref }}
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: get release version
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: get major release version
run: |
echo "MAJOR_RELEASE_VERSION=${RELEASE_VERSION%.*}" >> $GITHUB_ENV
echo "TRIMED_RELEASE_VERSION=${RELEASE_VERSION#v}" >> $GITHUB_ENV
- name: install Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: binary
run: make release-binary
- name: publish release
uses: ncipollo/release-action@v1
with:
tag: ${{ env.RELEASE_VERSION }}
artifacts: "*.tar.gz"
token: ${{ secrets.GITHUB_TOKEN }}