Skip to content

Commit

Permalink
ci: include version in artifacts created on GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
striezel committed Apr 6, 2024
1 parent a7f2b21 commit 7d8a5a0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ jobs:
runs-on: ubuntu-22.04
container: alpine:latest
steps:
- name: Install and prepare Git
run: |
apk update && apk upgrade
apk add git
git config --global --add safe.directory "$GITHUB_WORKSPACE"
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install packages
run: |
apk update
Expand Down Expand Up @@ -50,9 +57,14 @@ jobs:
cp LICENSE artifacts/
cp changelog.md artifacts/
cp documentation/third-party.md artifacts/
# determine version
VERSION=$(git describe --always)
echo Version is $VERSION.
mv artifacts thermos-$VERSION
tar czf thermos_${VERSION}_linux-amd64-generic.tar.gz thermos-$VERSION
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: thermos-alpine-artifacts
path: |
artifacts/*
name: thermos-linux-generic
path: thermos_*_linux-amd64-generic.tar.gz
if-no-files-found: error
13 changes: 10 additions & 3 deletions .github/workflows/msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: msys2/setup-msys2@v2
with:
msystem: mingw64
Expand Down Expand Up @@ -73,9 +75,14 @@ jobs:
cp LICENSE artifacts/
cp changelog.md artifacts/
cp documentation/third-party.md artifacts/
# determine version
VERSION=$(git describe --always)
echo Version is $VERSION.
mv artifacts thermos-$VERSION
"C:\Program Files\7-Zip\7z.exe" a -r thermos_${VERSION}_win64.zip thermos-$VERSION
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: msys2-artifacts-static-linking
path: |
artifacts/*
name: thermos-msys2-win64
path: thermos_*_win64.zip
if-no-files-found: error

0 comments on commit 7d8a5a0

Please sign in to comment.