Out of disk space errors on workflow runs, of course #51
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Trim CI agent | |
run: | | |
chmod +x contrib/free_disk_space.sh | |
./contrib/free_disk_space.sh | |
- 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 |