Skip to content

Commit 9e5ffec

Browse files
committed
Fetch the version number as created during the build
1 parent db78062 commit 9e5ffec

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/release.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,18 @@ jobs:
2323
autoreconf -fi
2424
./configure
2525
make dist
26+
- name: get version
27+
run: |
28+
VER=$(cat VERSION)
29+
echo "VERSION=$VER" >> $GITHUB_ENV
2630
- name: create release
2731
id: create_release
2832
uses: actions/create-release@latest
2933
env:
3034
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3135
with:
3236
tag_name: ${{ github.ref }}
33-
release_name: Release ${{ github.ref }}
37+
release_name: Release ${{ env.VERSION }}
3438
draft: true
3539
prerelease: true
3640
- name: upload release
@@ -39,6 +43,6 @@ jobs:
3943
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4044
with:
4145
upload_url: ${{ steps.create_release.outputs.upload_url }}
42-
asset_path: ./circa-0.1.tar.gz
43-
asset_name: circa-0.1.tar.gz
46+
asset_path: ./circa-${{ env.VERSION }}.tar.gz
47+
asset_name: circa-${{ env.VERSION }}.tar.gz
4448
asset_content_type: application/gzip

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ aclocal.m4
1616
/missing
1717
/stamp-h1
1818
/ca
19+
/VERSION

version.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33

44
v=`git describe --abbrev=4 --match="v*" HEAD 2>/dev/null || echo "UNKNOWN"`
55
v=`echo "$v" | tr -d "vg" | tr "\-" "."`
6+
echo $v > VERSION
67
printf %s "$v"

0 commit comments

Comments
 (0)