Skip to content

Commit bdce223

Browse files
committed
fix: cut new release with gitVersion
1 parent 2d93f83 commit bdce223

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

.github/workflows/release.yml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,32 @@ on:
77
- completed
88

99
jobs:
10+
set-deps-dotnet-poop-here:
11+
runs-on: ubuntu-latest
12+
container:
13+
image: mcr.microsoft.com/dotnet/sdk:6.0
14+
env:
15+
FOO: Bar
16+
REVISION: $GITHUB_SHA
17+
needs: build
18+
outputs:
19+
semVer: ${{ steps.gitversion.outputs.semVer }}
20+
steps:
21+
- uses: actions/checkout@v3
22+
with:
23+
fetch-depth: 0
24+
- name: Install GitVersion
25+
uses: gittools/actions/gitversion/[email protected]
26+
with:
27+
versionSpec: '5.x'
28+
- name: Set SemVer Version
29+
uses: gittools/actions/gitversion/[email protected]
30+
id: gitversion
31+
32+
- name: echo VERSIONS
33+
run: |
34+
echo "REVISION -> $GITHUB_SHA"
35+
echo "VERSION -> $GITVERSION_SEMVER"
1036
release:
1137
runs-on: ubuntu-latest
1238
container:
@@ -19,15 +45,18 @@ jobs:
1945
# volumes:
2046
# - my_docker_volume:/volume_mount
2147
# options: --cpus 1
48+
needs: set-deps-dotnet-poop-here
49+
env:
50+
SEMVER: ${{ needs.set-deps-dotnet-poop-here.outputs.semVer }}
2251
steps:
2352
- uses: actions/checkout@v3
2453
- name: install deps
2554
run: |
2655
apt update && apt install jq -y
2756
make REVISION=$GITHUB_SHA install
2857
- name: release library
29-
run: make REVISION=$GITHUB_SHA tag
58+
run: make GIT_TAG=${SEMVER} REVISION=$GITHUB_SHA tag
3059
- name: release binary
3160
run: |
32-
make REVISION=$GITHUB_SHA PAT=${{ secrets.GITHUB_TOKEN }} cross-build
33-
make REVISION=$GITHUB_SHA PAT=${{ secrets.GITHUB_TOKEN }} release
61+
make REVISION=$GITHUB_SHA GIT_TAG=${SEMVER} PAT=${{ secrets.GITHUB_TOKEN }} cross-build
62+
make REVISION=$GITHUB_SHA GIT_TAG=${SEMVER} PAT=${{ secrets.GITHUB_TOKEN }} release

0 commit comments

Comments
 (0)