chore(deps): bump actions/setup-node from 4 to 6 (#3719) #6763
This file contains hidden or 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: Build binaries | |
| on: [push] | |
| permissions: | |
| contents: read | |
| jobs: | |
| check-types: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.node-version' | |
| - name: Prepare | |
| run: | | |
| corepack enable | |
| # try and avoid timeout errors | |
| yarn config set httpTimeout 100000 | |
| yarn --immutable | |
| yarn build:ts | |
| - name: Check types | |
| run: | | |
| yarn check-types | |
| linux-x64: | |
| runs-on: ubuntu-22.04 | |
| needs: check-types | |
| timeout-minutes: 20 | |
| outputs: | |
| version: ${{ steps.filenames.outputs.longversion }} | |
| do-docker: ${{ steps.upload.outputs.branch }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| persist-credentials: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.node-version' | |
| - name: Cache build sources | |
| uses: actions/cache@v4 | |
| with: | |
| path: .cache | |
| key: linux-x64-build-cache-${{ hashFiles('nodejs-versions.json') }} | |
| - name: build & package | |
| run: | | |
| corepack enable | |
| # try and avoid timeout errors | |
| yarn config set httpTimeout 100000 | |
| yarn --immutable | |
| yarn tsx tools/build/complete.mts linux-x64 | |
| # manually tar it, to preserve the symlinks | |
| cd electron-output | |
| mv linux-unpacked companion-x64 | |
| tar -cvzf companion-x64.tar.gz companion-x64 | |
| env: | |
| CI: 1 | |
| SENTRY_DSN: ${{ secrets.SENTRY2_DSN }} | |
| VITE_SENTRY_DSN: ${{ secrets.SENTRY2_UI_DSN }} | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY2_AUTH_TOKEN }} | |
| USE_HARD_LINKS: false | |
| - name: Determine files to upload | |
| id: filenames | |
| shell: bash | |
| run: | | |
| VERSION=$(cat ./dist/BUILD) | |
| echo "sourcename=electron-output/companion-x64.tar.gz" >> $GITHUB_OUTPUT | |
| echo "targetname=companion-linux-x64-${VERSION}.tar.gz" >> $GITHUB_OUTPUT | |
| echo "longversion=${VERSION}" >> $GITHUB_OUTPUT | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.filenames.outputs.targetname }} | |
| path: ${{ steps.filenames.outputs.sourcename }} | |
| retention-days: 1 | |
| - name: Upload build | |
| id: upload | |
| uses: bitfocus/actions/upload-and-notify@main | |
| with: | |
| long-version: ${{ steps.filenames.outputs.longversion }} | |
| beta-branch: main | |
| dev-branch: develop | |
| source-filename: ${{ steps.filenames.outputs.sourcename }} | |
| destination-filename: ${{ steps.filenames.outputs.targetname }} | |
| s3-host: ${{ secrets.S3_HOST }} | |
| s3-bucket: ${{ secrets.S3_BUCKET }}/companion | |
| s3-access-key: ${{ secrets.S3_KEY }} | |
| s3-secret-key: ${{ secrets.S3_SECRET }} | |
| api-product: companion | |
| api-target: 'linux-tgz' | |
| api-secret: ${{ secrets.BITFOCUS_API_PROJECT_SECRET }} | |
| linux-arm64: | |
| runs-on: ubuntu-22.04-arm | |
| needs: check-types | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| persist-credentials: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.node-version' | |
| - name: Cache build sources | |
| uses: actions/cache@v4 | |
| with: | |
| path: .cache | |
| key: linux-arm64-build-cache-${{ hashFiles('nodejs-versions.json') }} | |
| - name: build & package | |
| run: | | |
| corepack enable | |
| # try and avoid timeout errors | |
| yarn config set httpTimeout 100000 | |
| yarn --immutable | |
| yarn tsx tools/build/complete.mts linux-arm64 | |
| # manually tar it, to preserve the symlinks | |
| cd electron-output | |
| mv linux-arm64-unpacked companion-arm64 | |
| tar -cvzf companion-arm64.tar.gz companion-arm64 | |
| env: | |
| CI: 1 | |
| SENTRY_DSN: ${{ secrets.SENTRY2_DSN }} | |
| VITE_SENTRY_DSN: ${{ secrets.SENTRY2_UI_DSN }} | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY2_AUTH_TOKEN }} | |
| SKIP_LAUNCH_CHECK: true | |
| USE_HARD_LINKS: false | |
| - name: Determine files to upload | |
| id: filenames | |
| shell: bash | |
| run: | | |
| VERSION=$(cat ./dist/BUILD) | |
| echo "sourcename=electron-output/companion-arm64.tar.gz" >> $GITHUB_OUTPUT | |
| echo "targetname=companion-linux-arm64-${VERSION}.tar.gz" >> $GITHUB_OUTPUT | |
| echo "longversion=${VERSION}" >> $GITHUB_OUTPUT | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.filenames.outputs.targetname }} | |
| path: ${{ steps.filenames.outputs.sourcename }} | |
| retention-days: 1 | |
| - name: Upload build | |
| uses: bitfocus/actions/upload-and-notify@main | |
| with: | |
| long-version: ${{ steps.filenames.outputs.longversion }} | |
| beta-branch: main | |
| dev-branch: develop | |
| source-filename: ${{ steps.filenames.outputs.sourcename }} | |
| destination-filename: ${{ steps.filenames.outputs.targetname }} | |
| s3-host: ${{ secrets.S3_HOST }} | |
| s3-bucket: ${{ secrets.S3_BUCKET }}/companion | |
| s3-access-key: ${{ secrets.S3_KEY }} | |
| s3-secret-key: ${{ secrets.S3_SECRET }} | |
| api-product: companion | |
| api-target: 'linux-arm64-tgz' | |
| api-secret: ${{ secrets.BITFOCUS_API_PROJECT_SECRET }} | |
| osx-x64: | |
| runs-on: macos-latest | |
| needs: check-types | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| persist-credentials: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.node-version' | |
| - name: Cache build sources | |
| uses: actions/cache@v4 | |
| with: | |
| path: .cache | |
| key: macos-x64-build-cache-${{ hashFiles('nodejs-versions.json') }} | |
| - name: build & package | |
| run: | | |
| corepack enable | |
| # try and avoid timeout errors | |
| yarn config set httpTimeout 100000 | |
| yarn --immutable | |
| yarn tsx tools/build/complete.mts darwin-x64 | |
| env: | |
| CI: 1 | |
| CSC_LINK: ${{ secrets.OSX_CSC_LINK }} | |
| CSC_KEY_PASSWORD: ${{ secrets.OSX_CSC_KEY_PASSWORD }} | |
| APPLE_ID: ${{ secrets.APPLEID }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLETEAMID }} | |
| APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLEIDPASS }} | |
| SENTRY_DSN: ${{ secrets.SENTRY2_DSN }} | |
| VITE_SENTRY_DSN: ${{ secrets.SENTRY2_UI_DSN }} | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY2_AUTH_TOKEN }} | |
| USE_HARD_LINKS: false | |
| NODE_OPTIONS: --max-old-space-size=4096 | |
| - name: Determine files to upload | |
| id: filenames | |
| shell: bash | |
| run: | | |
| VERSION=$(cat ./dist/BUILD) | |
| echo "sourcename=electron-output/companion-mac-x64.dmg" >> $GITHUB_OUTPUT | |
| echo "targetname=companion-mac-x64-${VERSION}.dmg" >> $GITHUB_OUTPUT | |
| echo "longversion=${VERSION}" >> $GITHUB_OUTPUT | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.filenames.outputs.targetname }} | |
| path: ${{ steps.filenames.outputs.sourcename }} | |
| retention-days: 1 | |
| - name: Upload build | |
| uses: bitfocus/actions/upload-and-notify@main | |
| with: | |
| long-version: ${{ steps.filenames.outputs.longversion }} | |
| beta-branch: main | |
| dev-branch: develop | |
| source-filename: ${{ steps.filenames.outputs.sourcename }} | |
| destination-filename: ${{ steps.filenames.outputs.targetname }} | |
| s3-host: ${{ secrets.S3_HOST }} | |
| s3-bucket: ${{ secrets.S3_BUCKET }}/companion | |
| s3-access-key: ${{ secrets.S3_KEY }} | |
| s3-secret-key: ${{ secrets.S3_SECRET }} | |
| api-product: companion | |
| api-target: 'mac-intel' | |
| api-secret: ${{ secrets.BITFOCUS_API_PROJECT_SECRET }} | |
| osx-arm64: | |
| runs-on: macos-latest | |
| needs: check-types | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| persist-credentials: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.node-version' | |
| - name: Cache build sources | |
| uses: actions/cache@v4 | |
| with: | |
| path: .cache | |
| key: macos-arm64-build-cache-${{ hashFiles('nodejs-versions.json') }} | |
| - name: prepare | |
| run: | | |
| corepack enable | |
| # try and avoid timeout errors | |
| yarn config set httpTimeout 100000 | |
| yarn --immutable | |
| env: | |
| CI: 1 | |
| - name: build & package | |
| run: | | |
| yarn tsx tools/build/complete.mts darwin-arm64 | |
| env: | |
| CI: 1 | |
| CSC_LINK: ${{ secrets.OSX_CSC_LINK }} | |
| CSC_KEY_PASSWORD: ${{ secrets.OSX_CSC_KEY_PASSWORD }} | |
| APPLE_ID: ${{ secrets.APPLEID }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLETEAMID }} | |
| APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLEIDPASS }} | |
| SENTRY_DSN: ${{ secrets.SENTRY2_DSN }} | |
| VITE_SENTRY_DSN: ${{ secrets.SENTRY2_UI_DSN }} | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY2_AUTH_TOKEN }} | |
| USE_HARD_LINKS: false | |
| SKIP_LAUNCH_CHECK: true | |
| NODE_OPTIONS: --max-old-space-size=4096 | |
| - name: Determine files to upload | |
| id: filenames | |
| shell: bash | |
| run: | | |
| VERSION=$(cat ./dist/BUILD) | |
| echo "sourcename=electron-output/companion-mac-arm64.dmg" >> $GITHUB_OUTPUT | |
| echo "targetname=companion-mac-arm64-${VERSION}.dmg" >> $GITHUB_OUTPUT | |
| echo "longversion=${VERSION}" >> $GITHUB_OUTPUT | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.filenames.outputs.targetname }} | |
| path: ${{ steps.filenames.outputs.sourcename }} | |
| retention-days: 1 | |
| - name: Upload build | |
| uses: bitfocus/actions/upload-and-notify@main | |
| with: | |
| long-version: ${{ steps.filenames.outputs.longversion }} | |
| beta-branch: main | |
| dev-branch: develop | |
| source-filename: ${{ steps.filenames.outputs.sourcename }} | |
| destination-filename: ${{ steps.filenames.outputs.targetname }} | |
| s3-host: ${{ secrets.S3_HOST }} | |
| s3-bucket: ${{ secrets.S3_BUCKET }}/companion | |
| s3-access-key: ${{ secrets.S3_KEY }} | |
| s3-secret-key: ${{ secrets.S3_SECRET }} | |
| api-product: companion | |
| api-target: 'mac-arm' | |
| api-secret: ${{ secrets.BITFOCUS_API_PROJECT_SECRET }} | |
| win32-x64: | |
| runs-on: ${{ (startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[build-signed]')) && fromJSON('["self-hosted", "Windows", "codecert", "X64"]') || 'windows-latest'}} | |
| needs: check-types | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| persist-credentials: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.node-version' | |
| - name: Cache build sources | |
| uses: actions/cache@v4 | |
| with: | |
| path: .cache | |
| key: windows-x64-build-cache-${{ hashFiles('nodejs-versions.json') }} | |
| - name: build & package | |
| shell: bash | |
| run: | | |
| corepack enable | |
| # try and avoid timeout errors | |
| yarn config set httpTimeout 100000 | |
| yarn --immutable | |
| env: | |
| CI: 1 | |
| - name: build & package (unsigned) | |
| if: ${{ runner.environment != 'self-hosted' }} | |
| run: | | |
| yarn tsx tools/build/complete.mts win32-x64 | |
| env: | |
| CI: 1 | |
| SENTRY_DSN: ${{ secrets.SENTRY2_DSN }} | |
| VITE_SENTRY_DSN: ${{ secrets.SENTRY2_UI_DSN }} | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY2_AUTH_TOKEN }} | |
| - name: build & package (signed) | |
| if: ${{ runner.environment == 'self-hosted' }} | |
| run: | | |
| yarn tsx tools/build/complete.mts win32-x64 | |
| env: | |
| CI: 1 | |
| SENTRY_DSN: ${{ secrets.SENTRY2_DSN }} | |
| VITE_SENTRY_DSN: ${{ secrets.SENTRY2_UI_DSN }} | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY2_AUTH_TOKEN }} | |
| CSC_LINK: c:\\actions-runner-bitfocusas\\codesign.cer | |
| BF_CODECERT_KEY: ${{ secrets.BF_CODECERT_KEY }} | |
| # the wincert machine has issues using the default cache location | |
| ELECTRON_BUILDER_CACHE: ${{ github.workspace }}/.cache/electron-builder | |
| NODE_OPTIONS: --max_old_space_size=4096 | |
| - name: Determine files to upload | |
| id: filenames | |
| shell: bash | |
| run: | | |
| VERSION=$(cat ./dist/BUILD) | |
| echo "sourcename=electron-output/companion-win64.exe" >> $GITHUB_OUTPUT | |
| echo "targetname=companion-win64-${VERSION}.exe" >> $GITHUB_OUTPUT | |
| echo "longversion=${VERSION}" >> $GITHUB_OUTPUT | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.filenames.outputs.targetname }} | |
| path: ${{ steps.filenames.outputs.sourcename }} | |
| retention-days: 1 | |
| - name: Upload build | |
| uses: bitfocus/actions/upload-and-notify@main | |
| with: | |
| long-version: ${{ steps.filenames.outputs.longversion }} | |
| beta-branch: main | |
| dev-branch: develop | |
| source-filename: ${{ steps.filenames.outputs.sourcename }} | |
| destination-filename: ${{ steps.filenames.outputs.targetname }} | |
| s3-host: ${{ secrets.S3_HOST }} | |
| s3-bucket: ${{ secrets.S3_BUCKET }}/companion | |
| s3-access-key: ${{ secrets.S3_KEY }} | |
| s3-secret-key: ${{ secrets.S3_SECRET }} | |
| api-product: companion | |
| api-target: 'win-x64' | |
| api-secret: ${{ secrets.BITFOCUS_API_PROJECT_SECRET }} | |
| docker-image: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| needs: | |
| - linux-x64 | |
| - linux-arm64 | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| IMAGE_NAME: companion | |
| steps: | |
| - name: Docker meta | |
| if: ${{ needs.linux-x64.outputs.do-docker }} | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| ghcr.io/${{ github.repository }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=raw,value=${{ needs.linux-x64.outputs.version }} | |
| type=ref,event=tag | |
| type=ref,event=branch | |
| - name: Set up QEMU | |
| if: ${{ steps.meta.outputs.tags }} | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| if: ${{ steps.meta.outputs.tags }} | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to registry | |
| if: ${{ steps.meta.outputs.tags }} | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/checkout@v5 | |
| if: ${{ steps.meta.outputs.tags }} | |
| with: | |
| persist-credentials: false | |
| - name: Check s4 cdn | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends dnsutils | |
| nslookup s4.bitfocus.io | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| if: ${{ steps.meta.outputs.tags }} | |
| env: | |
| DOCKER_BUILD_SUMMARY: false | |
| with: | |
| context: . | |
| file: Dockerfile.prebuild | |
| platforms: linux/amd64,linux/arm64/v8 | |
| push: true | |
| labels: ${{ steps.meta.outputs.labels }} | |
| tags: '${{ steps.meta.outputs.tags }}' | |
| build-args: | | |
| build_name=${{ needs.linux-x64.outputs.version }} |