forked from Equicord/Equibop
-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (48 loc) · 1.79 KB
/
Copy pathupload-node-modules.yml
File metadata and controls
60 lines (48 loc) · 1.79 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
name: Upload node_modules to release
on:
release:
types:
- published
workflow_dispatch:
permissions:
contents: write
jobs:
upload:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: x64
platform: linux/amd64
- arch: arm64
platform: linux/arm64
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
if: matrix.arch == 'arm64'
uses: docker/setup-qemu-action@v3
with:
platforms: linux/arm64
- name: Install system dependencies
if: matrix.arch == 'x64'
run: sudo apt-get update && sudo apt-get install -y libglib2.0-dev
- name: Install dependencies (native x64)
if: matrix.arch == 'x64'
uses: oven-sh/setup-bun@v2
- name: Install dependencies (native x64)
if: matrix.arch == 'x64'
run: bun install
- name: Install dependencies (Docker ARM64)
if: matrix.arch == 'arm64'
run: |
docker run --rm --platform ${{ matrix.platform }} \
-v "$(pwd):/work" -w /work \
oven/bun:1 \
bash -c "apt-get update && apt-get install -y libglib2.0-dev && bun install"
- name: Create node_modules tarball
run: tar -czf node_modules-${{ matrix.arch }}.tar.gz node_modules/
- name: Upload to release
run: |
gh release upload "${{ github.event.release.tag_name }}" node_modules-${{ matrix.arch }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}