-
Notifications
You must be signed in to change notification settings - Fork 4
75 lines (71 loc) · 2.04 KB
/
publish.yml
File metadata and controls
75 lines (71 loc) · 2.04 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
name: Publish Release
on:
# Release
release:
types: [released]
# Nightly
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
run-name: >-
${{
github.event_name == 'release' && 'Publish Release'
|| (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 'Next Publication'
|| 'Publish Release' }}
jobs:
publish:
if: github.event_name == 'release'
runs-on: ubuntu-latest
environment: release
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- name: Install OS dependencies
run: |
sudo apt-get update
# Required for USB functionality
sudo apt-get install -y libusb-1.0-0-dev
# Required for Linux udev/device detection
sudo apt-get install -y libudev-dev
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Publish
run: npm publish --access public
env:
NPM_CONFIG_PROVENANCE: 'true'
publish-nightly:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
environment: release
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- name: Install OS dependencies
run: |
sudo apt-get update
# Required for USB functionality
sudo apt-get install -y libusb-1.0-0-dev
# Required for Linux udev/device detection
sudo apt-get install -y libudev-dev
- name: Package next
run: ./scripts/package-next
- name: Publish
run: npm publish --provenance --tag next
env:
NPM_CONFIG_PROVENANCE: 'true'