-
-
Notifications
You must be signed in to change notification settings - Fork 2
93 lines (84 loc) · 3.96 KB
/
release.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Release npm package
on:
push:
tags:
- 'v*'
jobs:
pkg:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/
- uses: actions/setup-go@v5
with:
go-version: '^1.19.8'
- uses: swift-actions/setup-swift@v2
if: matrix.os == 'ubuntu-latest'
- uses: oras-project/setup-oras@v1
- run: oras version
- name: Release
run: |
wget https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-amd64_linux.tar.xz
tar -xvf upx-4.2.4-amd64_linux.tar.xz
chmod +x upx-4.2.4-amd64_linux/upx
sudo cp upx-4.2.4-amd64_linux/upx /usr/local/bin/
npm config set //npm.pkg.github.com/:_authToken=$GITHUB_TOKEN
npm config set //registry.npmjs.org/:_authToken=$NPMJS_AUTH_TOKEN
bash build.sh
echo "cyclonedx:registry=https://npm.pkg.github.com" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://npm.pkg.github.com'
echo "cyclonedx:registry=https://registry.npmjs.org" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://registry.npmjs.org'
pushd packages/windows-amd64
echo "cyclonedx:registry=https://npm.pkg.github.com" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://npm.pkg.github.com'
echo "cyclonedx:registry=https://registry.npmjs.org" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://registry.npmjs.org'
popd
pushd packages/linux-arm64
echo "cyclonedx:registry=https://npm.pkg.github.com" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://npm.pkg.github.com'
echo "cyclonedx:registry=https://registry.npmjs.org" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://registry.npmjs.org'
popd
pushd packages/linux-arm
echo "cyclonedx:registry=https://npm.pkg.github.com" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://npm.pkg.github.com'
echo "cyclonedx:registry=https://registry.npmjs.org" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://registry.npmjs.org'
popd
pushd packages/windows-arm64
echo "cyclonedx:registry=https://npm.pkg.github.com" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://npm.pkg.github.com'
echo "cyclonedx:registry=https://registry.npmjs.org" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://registry.npmjs.org'
popd
pushd packages/darwin-arm64
echo "cyclonedx:registry=https://npm.pkg.github.com" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://npm.pkg.github.com'
echo "cyclonedx:registry=https://registry.npmjs.org" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://registry.npmjs.org'
popd
pushd packages/darwin-amd64
echo "cyclonedx:registry=https://npm.pkg.github.com" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://npm.pkg.github.com'
echo "cyclonedx:registry=https://registry.npmjs.org" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://registry.npmjs.org'
popd
pushd packages/ppc64
echo "cyclonedx:registry=https://npm.pkg.github.com" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://npm.pkg.github.com'
echo "cyclonedx:registry=https://registry.npmjs.org" > ~/.npmrc
npm publish --access=public --@cyclonedx:registry='https://registry.npmjs.org'
popd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPMJS_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_OPTIONS: --max_old_space_size=4096