Skip to content

Release

Release #26

Workflow file for this run

name: Release
on:
release:
types:
- created
workflow_dispatch:
jobs:
build:
name: Build binaries
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get git tag
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
- name: Generate build files
uses: wangyoucao577/go-release-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
binary_name: "ready"
ldflags: -X main.Version=${{ env.GIT_TAG }}
publish:
name: Publish package to Go proxy
runs-on: ubuntu-latest
needs: build
steps:
- name: Install Go
uses: actions/setup-go@v2
- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get git tag
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
- name: Publish package
run: GO111MODULE=on GOPROXY=proxy.golang.org go list -ldflags "-X main.Version=${{ env.GIT_TAG }}" -m github.com/lewislbr/ready@${{ env.GIT_TAG }}