Skip to content

Commit

Permalink
Refine the CI a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
Kleidukos committed Sep 16, 2024
1 parent 659985d commit 8481ba9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,8 @@ jobs:
strip distribution/get-tested
upx -9 distribution/get-tested
- name: Tar get-tested executable
- name: Create artifact name
run: |
GETTESTED_EXEC=distribution/get-tested
ARTIFACT_NAME="get-tested-head-${{ runner.os }}-static-${{ env.ARCH }}"
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

jobs:
generate-matrix:
if: startsWith(github.ref, 'refs/tags/v')
name: 'Generate matrix from cabal'
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
Expand Down Expand Up @@ -80,28 +81,27 @@ jobs:
mkdir distribution
cp ${bin} distribution/get-tested
- id: version
run: |
version=$(./distribution/get-tested --version)
echo "VERSION=${version}" >> "$GITHUB_ENV"
- name: Post-process executables
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
strip distribution/get-tested
upx -9 distribution/get-tested
- name: Package the get-tested executable
- id: version
run: |
version=$(./distribution/get-tested --version)
echo "VERSION=${version}" >> "$GITHUB_ENV"
- name: Create artifact name
run: |
executable=distribution/get-tested
ARTIFACT_NAME="get-tested-${{ env.VERSION }}-${{ runner.os }}-${{ env.ARCH }}"
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
- name: Upload the get-tested executable
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_NAME }}.tar.gz
path: distribution/get-tested

build-alpine:
env:
Expand Down Expand Up @@ -181,9 +181,8 @@ jobs:
strip distribution/get-tested
upx -9 distribution/get-tested
- name: Package the get-tested executable
- name: get-tested executable
run: |
GETTESTED_EXEC=distribution/get-tested
ARTIFACT_NAME="get-tested-${{ env.VERSION }}-${{ runner.os }}-static-${{ env.ARCH }}"
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
Expand Down

0 comments on commit 8481ba9

Please sign in to comment.