-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.64 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build, Test, and Release
on:
push:
pull_request:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
submodules: recursive
- uses: DeterminateSystems/nix-installer-action@b92f66560d6f97d6576405a7bae901ab57e72b6a
- uses: DeterminateSystems/magic-nix-cache-action@a76a83091cd8728db8c37312dbdd0eeb1177a6c0
- run: nix build '.?submodules=1#squirrel'
- uses: actions/upload-artifact@184d73b71b93c222403b2e7f1ffebe4508014249
with:
name: libsquirrel.a
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
submodules: recursive
- uses: DeterminateSystems/nix-installer-action@b92f66560d6f97d6576405a7bae901ab57e72b6a
- uses: DeterminateSystems/magic-nix-cache-action@a76a83091cd8728db8c37312dbdd0eeb1177a6c0
- run: nix flake check
release:
concurrency:
group: release
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
needs: [build, test]
env:
VERSION: ${{github.event.after}}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
fetch-depth: '0'
- uses: actions/download-artifact@d0ce8fd1167ed839810201de977912a090ab10a7
with:
name: libsquirrel.a
- uses: anothrNick/[email protected]
id: tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
- run: gh release create ${{steps.tag.outputs.new_tag}} -d --generate-notes libsquirrel.a