-
-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (43 loc) · 1.39 KB
/
publish.yml
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
name: Publish Package
on:
workflow_dispatch:
push:
tags:
- "*"
jobs:
publish:
runs-on: ubuntu-latest
container: fedora:latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v3
- name: 🛑 Check Tag
run: |
dnf install -y jq
pkg_version="v$(jq -r .version < package.json)"
if [[ "${{ github.ref_name }}" != "$pkg_version" ]]; then
echo "Tag ${{ github.ref_name }} does not match package.json version $pkg_version" >&2
exit 1
fi
- name: 👷 Build Dependencies
run: |
dnf install -y make automake gcc gcc-c++ kernel-devel cmake git
dnf install -y pipewire-devel pipewire-libs pulseaudio-libs-devel pipewire-pulseaudio
- name: 🍃 Install Node
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: "https://registry.npmjs.org"
- name: 🍃 Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: 🔨 Build
run: "pnpm install"
- name: 🛠️ Prepare Prebuilds
run: pnpm pkg-prebuilds-copy --baseDir build/Release --source venmic-addon.node --name=venmic-addon --strip --napi_version=7
- name: 🛒 Publish
run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}