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
# note: since we build releases from tags (strategy.matrix.branch),
# - we should only use official version tags on vetted branches,
# - we only allow manual runs (by admins),
# - we always produce draft releases (not actual ones so we can verify first)
# - ensure persist-credentials: false
on:
workflow_dispatch: # run the workflow manually
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true # Cancel any in-progress runs of this workflow when a new run is triggered on the same ref (branch or tag)
permissions:
contents: write
env:
RELEASE: Release v3.7.0
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
name: Release
jobs:
build:
name: Bundle
runs-on: ${{ matrix.os }}
strategy:
matrix:
branch:
# we build on the oldest ubuntu version for better binary compatibility.
os:
steps:
# Checkout: https://github.com/actions/checkout
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ matrix.branch }}
fetch-tags: true
fetch-depth: 0
persist-credentials: false
# Build
- name: Build (Windows)
if: runner.os == 'Windows'
run: |
./bin/bundle.bat
- name: Build (Linux, macOS)
if: runner.os != 'Windows'
run: |
./bin/bundle.sh
# Create a release: https://github.com/softprops/action-gh-release (MIT license)
- name: Release
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
if: ${{ env.RELEASE != '' && env.RELEASE != 'no' }}
with:
name: ${{ env.RELEASE }}
draft: true
body_path: doc/release-notes.md
files: |
out/bundle/*.tar.gz