forked from johannesjo/parallel-code
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (86 loc) · 3.17 KB
/
Copy pathrelease.yml
File metadata and controls
102 lines (86 loc) · 3.17 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
create-release:
runs-on: ubuntu-latest
outputs:
release_id: ${{ steps.create.outputs.id }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Create draft release
id: create
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
with:
draft: true
generate_release_notes: true
build-linux:
needs: create-release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '22'
cache: npm
- run: npm ci
- name: Build and publish
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build -- --publish always
build-macos:
needs: create-release
runs-on: macos-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '22'
cache: npm
- run: npm ci
# Unsigned test build — no Apple Developer cert or notarization required.
# To restore signed + notarized releases: re-add the cert-import and
# notarization-key steps, set APPLE_API_KEY/APPLE_API_KEY_ID/APPLE_API_ISSUER,
# and drop the CSC_IDENTITY_AUTO_DISCOVERY + -c.mac.notarize=false overrides.
- name: Build (unsigned) and publish
env:
NODE_OPTIONS: '--max-old-space-size=4096'
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build -- --universal -c.mac.notarize=false --publish always
# Attach the agent image as a per-arch tarball to the release, so the app can fetch
# it host-side and `docker load` it when the Docker daemon can't reach a registry
# (e.g. it runs in a VM with no egress). Built on native runners — no QEMU.
agent-image:
needs: create-release
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
runner: ubuntu-24.04
- arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Build agent image (${{ matrix.arch }})
run: docker build -t thunderockforge/forge-agent:latest ./docker
- name: Save + compress + checksum
run: |
set -euo pipefail
asset="forge-agent-${{ matrix.arch }}.tar.gz"
docker save thunderockforge/forge-agent:latest | gzip > "$asset"
sha256sum "$asset" > "$asset.sha256"
ls -lh "$asset" "$asset.sha256"
- name: Upload image asset to the release
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
with:
draft: true
files: |
forge-agent-${{ matrix.arch }}.tar.gz
forge-agent-${{ matrix.arch }}.tar.gz.sha256