-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (53 loc) · 1.77 KB
/
pr.yml
File metadata and controls
65 lines (53 loc) · 1.77 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: PR Build
on:
pull_request:
branches:
- 'main'
paths-ignore:
- 'docs/**'
- 'README.md'
- 'LICENSE'
- 'NOTICE.md'
- 'CLAUDE.md'
- '.github/ISSUE_TEMPLATE/**'
permissions:
contents: read
concurrency:
group: ci-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Nix
uses: nixbuild/nix-quick-install-action@v34
- name: Cache Nix store
uses: nix-community/cache-nix-action@v7
with:
primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock') }}
restore-prefixes-first-match: nix-${{ runner.os }}-
- name: Load devShell
uses: rrbutani/use-nix-shell-action@v1
with:
devShell: .#default
- name: Resolve metadata
run: bash .github/scripts/meta.sh
- name: Package client
id: package
run: bash .github/scripts/client.sh "${SLUG}-pr${{ github.event.pull_request.number }}"
- name: Package server
id: package_server
run: bash .github/scripts/server.sh "${SLUG}-pr${{ github.event.pull_request.number }}" "https://raw.githubusercontent.com/${{ github.event.pull_request.head.repo.full_name }}/${{ github.event.pull_request.head.sha }}/pack.toml"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: "${{ env.SLUG }}-pr${{ github.event.pull_request.number }}"
path: |
${{ steps.package.outputs.curseforge_zip }}
${{ steps.package_server.outputs.server_zip }}
retention-days: 3
if-no-files-found: error