Skip to content

Commit

Permalink
Refetch tags to fix issue with git describe
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1bo committed Aug 16, 2024
1 parent 6b9b69b commit 4a59997
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,18 @@ 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
unzip result/*.zip -d out
# FIXME: this does not correctly git describe
git describe --always ${{ github.ref }}
git fetch --tags --force
git describe --always ${{ github.ref }}
echo "VERSION=$(git describe --always ${{ github.ref }})" >> "$GITHUB_ENV"
- name: 💾 Upload executables
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -80,13 +82,18 @@ 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
unzip result/*.zip -d out
# FIXME: this does not correctly git describe
echo "VERSION=$(git describe --always ${{ github.ref }})" >> "$GITHUB_ENV"
- name: 💾 Upload executables
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 4a59997

Please sign in to comment.