@lumen5/beamcoder 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,52 +9,78 @@ on:
|
|
|
9
9
|
workflow_dispatch:
|
|
10
10
|
|
|
11
11
|
jobs:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
prebuild:
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
include:
|
|
16
|
+
- os: ubuntu-latest
|
|
17
|
+
platform: linux
|
|
18
|
+
- os: macos-14
|
|
19
|
+
platform: darwin
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
17
21
|
steps:
|
|
18
22
|
- uses: actions/checkout@v3
|
|
19
23
|
|
|
20
24
|
- uses: actions/setup-node@v3
|
|
21
25
|
with:
|
|
22
26
|
node-version: 22
|
|
23
|
-
registry-url: https://registry.npmjs.org/
|
|
24
27
|
|
|
25
28
|
- name: Get package version
|
|
26
29
|
id: version
|
|
27
30
|
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
|
28
31
|
|
|
29
|
-
- name:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- name: Copy source
|
|
33
|
-
run: cp -r . /tmp/beamcoder
|
|
34
|
-
|
|
35
|
-
- name: Install system dependencies
|
|
32
|
+
- name: Install system dependencies (Linux)
|
|
33
|
+
if: matrix.platform == 'linux'
|
|
36
34
|
run: sudo apt-get update && sudo apt-get install -y libvpx-dev
|
|
37
35
|
|
|
38
|
-
- name: Install
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
- name: Install system dependencies (macOS)
|
|
37
|
+
if: matrix.platform == 'darwin'
|
|
38
|
+
run: brew install libvpx
|
|
41
39
|
|
|
42
40
|
- name: Install dependencies (skip native build)
|
|
43
41
|
run: yarn install --frozen-lockfile --ignore-scripts
|
|
44
|
-
working-directory: /tmp/beamcoder
|
|
45
42
|
|
|
46
43
|
- name: Download FFmpeg static libraries
|
|
47
44
|
run: node install_ffmpeg_static.js
|
|
48
|
-
working-directory: /tmp/beamcoder
|
|
49
45
|
|
|
50
46
|
- name: Build prebuild
|
|
51
47
|
run: npx prebuild --strip -r node -t 22.0.0
|
|
52
|
-
working-directory: /tmp/beamcoder
|
|
53
48
|
env:
|
|
54
49
|
FFMPEG_STATIC: "1"
|
|
55
50
|
|
|
56
51
|
- name: List prebuilds
|
|
57
|
-
run: find
|
|
52
|
+
run: find prebuilds -name "*.tar.gz" -ls
|
|
53
|
+
|
|
54
|
+
- name: Upload prebuild artifact
|
|
55
|
+
uses: actions/upload-artifact@v4
|
|
56
|
+
with:
|
|
57
|
+
name: prebuild-${{ matrix.platform }}
|
|
58
|
+
path: prebuilds/**/*.tar.gz
|
|
59
|
+
|
|
60
|
+
release:
|
|
61
|
+
needs: prebuild
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/checkout@v3
|
|
65
|
+
|
|
66
|
+
- uses: actions/setup-node@v3
|
|
67
|
+
with:
|
|
68
|
+
node-version: 22
|
|
69
|
+
registry-url: https://registry.npmjs.org/
|
|
70
|
+
|
|
71
|
+
- name: Get package version
|
|
72
|
+
id: version
|
|
73
|
+
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
|
74
|
+
|
|
75
|
+
- name: Download all prebuild artifacts
|
|
76
|
+
uses: actions/download-artifact@v4
|
|
77
|
+
with:
|
|
78
|
+
path: prebuilds
|
|
79
|
+
pattern: prebuild-*
|
|
80
|
+
merge-multiple: true
|
|
81
|
+
|
|
82
|
+
- name: List all prebuilds
|
|
83
|
+
run: find prebuilds -name "*.tar.gz" -ls
|
|
58
84
|
|
|
59
85
|
- name: Create or update release
|
|
60
86
|
# if: github.ref == 'refs/heads/main'
|
|
@@ -67,19 +93,26 @@ jobs:
|
|
|
67
93
|
echo "Creating release $VERSION..."
|
|
68
94
|
gh release create "$VERSION" --title "$VERSION" --notes "Prebuilt binaries for version $VERSION"
|
|
69
95
|
fi
|
|
70
|
-
# Upload prebuilds
|
|
71
|
-
find
|
|
96
|
+
# Upload prebuilds
|
|
97
|
+
find prebuilds -name "*.tar.gz" -exec gh release upload "$VERSION" {} --clobber \;
|
|
72
98
|
env:
|
|
73
99
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
74
100
|
|
|
101
|
+
- name: Install system dependencies
|
|
102
|
+
run: sudo apt-get update && sudo apt-get install -y libvpx-dev
|
|
103
|
+
|
|
104
|
+
- name: Install dependencies (skip native build)
|
|
105
|
+
run: yarn install --frozen-lockfile --ignore-scripts
|
|
106
|
+
|
|
107
|
+
- name: Download FFmpeg static libraries
|
|
108
|
+
run: node install_ffmpeg_static.js
|
|
109
|
+
|
|
75
110
|
- name: Build for npm publish
|
|
76
111
|
# if: github.ref == 'refs/heads/main'
|
|
77
112
|
run: FFMPEG_STATIC=1 npx node-gyp rebuild
|
|
78
|
-
working-directory: /tmp/beamcoder
|
|
79
113
|
|
|
80
114
|
- name: Publish to npm
|
|
81
115
|
# if: github.ref == 'refs/heads/main'
|
|
82
116
|
run: npm publish
|
|
83
|
-
working-directory: /tmp/beamcoder
|
|
84
117
|
env:
|
|
85
118
|
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
|
package/package.json
CHANGED
|
index f074baf..156e023 100644
|
|
|
Binary file
|