-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (68 loc) · 2.04 KB
/
release.yml
File metadata and controls
79 lines (68 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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/eirctl-setup@v0.3.1
with:
version: latest
isPrerelease: false
- name: git-deps
run: |
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: |
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/action-gh-release@v2.2.1
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: false