-
Notifications
You must be signed in to change notification settings - Fork 38
62 lines (48 loc) · 2.05 KB
/
release.yml
File metadata and controls
62 lines (48 loc) · 2.05 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
name: Release
on:
push:
tags:
- 'v*' # Triggers on v2.0.0, v2.1.0-beta, etc.
permissions:
contents: write # Required to create releases
id-token: write # Required for npm OIDC trusted publishing
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- name: Install build tools
run: npm install -g terser csso-cli
- name: Build
run: |
chmod +x scripts/build.sh
bash scripts/build.sh "${{ github.ref_name }}"
- name: Package release zip
run: |
cd build
zip -r ../frametrail-${{ github.ref_name }}.zip .
cd ..
echo "Package size: $(du -sh frametrail-${{ github.ref_name }}.zip | cut -f1)"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: frametrail-${{ github.ref_name }}.zip
generate_release_notes: true
body: |
Download [`frametrail-${{ github.ref_name }}.zip`](https://github.com/OpenHypervideo/FrameTrail/releases/download/${{ github.ref_name }}/frametrail-${{ github.ref_name }}.zip) and extract it.
**Server mode** — Run `php -S localhost:8080` (PHP 7.4+), open `http://localhost:8080` and follow the setup wizard.
**Local folder mode** (no server) — Open `index.html` in Chrome or Edge and select a data folder when prompted.
For full documentation, see the [repository](https://github.com/OpenHypervideo/FrameTrail).
**CDN (jsDelivr):**
```
https://cdn.jsdelivr.net/npm/@frametrail/frametrail@${{ github.ref_name }}/frametrail.min.js
https://cdn.jsdelivr.net/npm/@frametrail/frametrail@${{ github.ref_name }}/frametrail.min.css
```
- name: Publish to npm
run: npm publish build/ --access public --provenance