Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix binaries artifact names when built on tags #1569

Merged
merged 5 commits into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .github/workflows/binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ name: Binaries
on:
push:
branches:
- "**"
- main
- release
tags:
- "*.*.*"
pull_request:

jobs:
# Produces static ELF binary for using MuslC which includes all needed
Expand Down Expand Up @@ -34,11 +36,17 @@ jobs:
name: cardano-scaling
authToken: '${{ secrets.CACHIX_CARDANO_SCALING_AUTH_TOKEN }}'

- name: 🕵 Determine version
run: |
# NOTE: For some reason the fetched tags on checkout are not effective
# and we need to refetch with --force for git describe.
git fetch --tags --force
echo "VERSION=$(git describe --always ${{ github.ref }})" >> "$GITHUB_ENV"

- name: ❄ Build static executables
run: |
nix build .#release-static
# XXX: Why unzip https://github.com/actions/upload-artifact/issues/39
echo "VERSION=$(git describe --always ${{ github.ref }})" >> "$GITHUB_ENV"
unzip result/*.zip -d out

- name: 💾 Upload executables
Expand Down Expand Up @@ -72,11 +80,17 @@ jobs:
name: cardano-scaling
authToken: '${{ secrets.CACHIX_CARDANO_SCALING_AUTH_TOKEN }}'

- name: 🕵 Determine version
run: |
# NOTE: For some reason the fetched tags on checkout are not effective
# and we need to refetch with --force for git describe.
git fetch --tags --force
echo "VERSION=$(git describe --always ${{ github.ref }})" >> "$GITHUB_ENV"

- name: ❄ Build executables
run: |
nix build .#release
# XXX: Why unzip https://github.com/actions/upload-artifact/issues/39
echo "VERSION=$(git describe --always ${{ github.ref }})" >> "$GITHUB_ENV"
unzip result/*.zip -d out

- name: 💾 Upload executables
Expand Down