Skip to content

Commit e7dcee7

Browse files
committed
Second attempt at setting up CI
1 parent 6441faa commit e7dcee7

File tree

1 file changed

+27
-22
lines changed

1 file changed

+27
-22
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ on:
1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest
16-
1716
strategy:
1817
matrix:
1918
target: [
@@ -28,44 +27,50 @@ jobs:
2827

2928
steps:
3029
- name: Checkout the repository
31-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3231

3332
- name: Set up Nix
34-
uses: cachix/install-nix-action@v15
33+
uses: cachix/install-nix-action@v22
34+
with:
35+
extra_nix_config: |
36+
experimental-features = nix-command flakes
3537
3638
- name: Build and Create ZIP Archive
3739
run: |
3840
nix build .#${{ matrix.target }}
39-
cp -rP result fina-${{ matrix.target }}
40-
tar cvfz fina-${{ matrix.target }}.tar.gz fina-${{ matrix.target }}
41+
cp -rL result/ fina-${{ matrix.target }}
42+
tar -cvzf fina-${{ matrix.target }}.tar.gz fina-${{ matrix.target }}
43+
rm -rf fina-${{ matrix.target }}
4144
42-
- name: Upload ZIP Files as Artifacts
43-
uses: actions/upload-artifact@v3
45+
- name: Upload Artifacts
46+
uses: actions/upload-artifact@v4
4447
with:
45-
name: fina-binaries
46-
path: *.tar.gz
48+
name: bin-${{ matrix.target }}
49+
path: fina-${{ matrix.target }}.tar.gz
4750

4851
release:
4952
runs-on: ubuntu-latest
5053
needs: build
5154
if: startsWith(github.ref, 'refs/tags/v')
55+
permissions:
56+
contents: write
5257

5358
steps:
54-
- name: Checkout the repository
55-
uses: actions/checkout@v3
56-
57-
- name: Set up Nix
58-
uses: cachix/install-nix-action@v15
59-
60-
- name: Create GitHub Release
61-
uses: gh-actions/create-release@v1
59+
- name: Download all artifacts
60+
uses: actions/download-artifact@v4
6261
with:
63-
tag_name: ${{ github.ref_name }}
64-
release_name: "Release ${{ github.ref_name }}"
65-
draft: false
66-
prerelease: false
62+
path: artifacts
63+
pattern: bin-*
64+
merge-multiple: true
65+
66+
- name: Generate Checksums
67+
working-directory: artifacts
68+
run: |
69+
sha256sum *.tar.gz > SHA256SUMS.txt
6770
6871
- name: Upload release assets
6972
uses: softprops/action-gh-release@v1
7073
with:
71-
files: *.tar.gz
74+
files: |
75+
artifacts/*.tar.gz
76+
artifacts/SHA256SUMS.txt

0 commit comments

Comments
 (0)