Skip to content

release

release #29

Workflow file for this run

name: release
on:
workflow_run:
workflows: ['CI']
types:
- completed
branches:
- master
permissions:
contents: write
jobs:
set-version:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.head_branch == 'master' }}
container:
image: mcr.microsoft.com/dotnet/sdk:6.0
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v1
with:
versionSpec: '5.x'
- name: set global dir
run: git config --system --add safe.directory "$GITHUB_WORKSPACE"
- name: Set SemVer Version
uses: gittools/actions/gitversion/execute@v1
id: gitversion
- name: echo VERSIONS
run: |
echo "REVISION -> $GITHUB_SHA"
echo "VERSION -> $GITVERSION_SEMVER"
release:
runs-on: ubuntu-latest
needs: set-version
env:
SEMVER: ${{ needs.set-version.outputs.semVer }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ensono/actions/[email protected]
with:
version: latest
isPrerelease: false
- name: git-deps
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config user.email ${{ github.actor }}[email protected]
git config user.name ${{ github.actor }}
- name: release library
run: |
VERSION=${SEMVER} REVISION=$GITHUB_SHA eirctl run tag
- name: Build binary
run: |
eirctl run pipeline bin:release --set Version=${SEMVER} --set Revision=$GITHUB_SHA
- name: Release
uses: softprops/[email protected]
with:
tag_name: ${{ needs.set-version.outputs.semVer }}
# TODO: add additional info to the release
generate_release_notes: true
token: ${{ secrets.GITHUB_TOKEN }}
files: ./dist/*
prerelease: true