Skip to content

release

release #90

Workflow file for this run

name: release
on:
workflow_run:
workflows: ['CI']
types:
- completed
jobs:
set-version:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
container:
image: mcr.microsoft.com/dotnet/sdk:6.0
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.15
with:
versionSpec: '5.x'
- name: Set SemVer Version
uses: gittools/actions/gitversion/execute@v0.9.15
id: gitversion
- name: echo VERSIONS
run: |
echo "REVISION -> $GITHUB_SHA"
echo "VERSION -> $GITVERSION_SEMVER"
release:
runs-on: ubuntu-latest
container:
image: golang:1.19-bullseye
env:
FOO: Bar
needs: set-version
env:
SEMVER: ${{ needs.set-version.outputs.semVer }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: install deps
run: |
apt-get update && apt-get install jq git -y
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config user.email ${{ github.actor }}-ci@gha.org
git config user.name ${{ github.actor }}
- name: release library
run: |
make GIT_TAG=${SEMVER} REVISION=$GITHUB_SHA tag
- name: release binary
run: |
make REVISION=$GITHUB_SHA GIT_TAG=${SEMVER} PAT=${{ secrets.GITHUB_TOKEN }} cross-build
make REVISION=$GITHUB_SHA GIT_TAG=${SEMVER} PAT=${{ secrets.GITHUB_TOKEN }} release