Skip to content

Commit 568650f

Browse files
catfromplan9evan-goode
authored andcommitted
Add release workflow
1 parent 8a5d128 commit 568650f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v5
17+
- uses: cachix/install-nix-action@v31
18+
with:
19+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
20+
21+
- uses: DeterminateSystems/magic-nix-cache-action@main
22+
23+
- id: filenames
24+
run: echo VENDORED_TARBALL="$(nix eval --raw .#packages.x86_64-linux.vendored-tarball-filename)" >> "$GITHUB_OUTPUT"
25+
26+
- run: |
27+
nix build .#vendored-tarball
28+
ln -s result "${{ steps.filenames.outputs.VENDORED_TARBALL }}"
29+
30+
- name: Create GitHub Release (Draft)
31+
uses: softprops/action-gh-release@v2
32+
with:
33+
draft: true
34+
tag_name: ${{ github.ref_name }}
35+
files: ${{ steps.filenames.outputs.VENDORED_TARBALL }}
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)