fix soon to be broken github actions that need the node24 runner #1220
Workflow file for this run
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: Desktop Build | |
| on: | |
| release: | |
| types: [released, prereleased] | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| jobs: | |
| build-debug-distributables: | |
| if: github.event_name == 'pull_request' && github.event.pull_request.draft == false | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-22.04 | |
| target: linux | |
| source_path: linux | |
| build_cmd: "--linux AppImage" | |
| artifact_glob: "packages/desktop/dist/*.AppImage" | |
| - os: macos-15-intel | |
| target: macos | |
| source_path: darwin | |
| build_cmd: "--mac" | |
| artifact_glob: "packages/desktop/dist/*.dmg" | |
| - os: windows-latest | |
| target: win | |
| source_path: win32 | |
| build_cmd: "--win" | |
| artifact_glob: "packages/desktop/dist/*.exe" | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| TEST_MODE: true | |
| IS_LOCAL: true | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Setup environment | |
| uses: ./.github/actions/setup-env | |
| with: | |
| bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle,helia,@quiet/node-common" | |
| - name: Extract version | |
| id: extract_version | |
| uses: Saionaro/extract-package-version@fdb5b74adc1278ddb777dfed4c988b9d098bb48d # v1.2.1 | |
| with: | |
| path: packages/desktop | |
| - name: Install libfuse (Linux only) | |
| if: matrix.os == 'ubuntu-22.04' | |
| run: sudo apt-get update && sudo apt-get install -y libfuse2 | |
| - name: Get branch name | |
| id: branch | |
| shell: bash | |
| run: | | |
| B_NAME=$(echo "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" | sed 's|/|-|g') | |
| echo "branch_name=$B_NAME" >> $GITHUB_OUTPUT | |
| echo "BRANCH_NAME=$B_NAME" >> $GITHUB_ENV | |
| - name: Before build | |
| uses: ./.github/actions/before-build | |
| with: | |
| source-path: ${{ matrix.source_path }} | |
| envfile: .env.development | |
| - name: Build desktop preview | |
| shell: bash | |
| env: | |
| COMMIT_SHA: ${{ github.event.pull_request.head.sha }} | |
| BRANCH: ${{ steps.branch.outputs.branch_name }} | |
| run: | | |
| cd packages/desktop | |
| export VERSION_SUFFIX="-$BRANCH-$COMMIT_SHA" | |
| node - <<'NODE' | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const pkgPath = path.resolve('package.json'); | |
| const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8')); | |
| pkg.version += process.env.VERSION_SUFFIX; | |
| fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2)); | |
| NODE | |
| USE_HARD_LINKS=false node_modules/.bin/electron-builder ${{ matrix.build_cmd }} -p never | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Quiet-${{ matrix.target }}-${{ steps.extract_version.outputs.version }}-${{ steps.branch.outputs.branch_name }}-${{ github.event.pull_request.head.sha }} | |
| path: ${{ matrix.artifact_glob }} | |
| retention-days: 14 | |
| release-start-notification-desktop: | |
| runs-on: ubuntu-22.04 | |
| if: | | |
| startsWith(github.ref, 'refs/tags/@quiet/desktop') | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: 'recursive' | |
| - name: Extract version | |
| id: extract_version | |
| uses: Saionaro/extract-package-version@fdb5b74adc1278ddb777dfed4c988b9d098bb48d # v1.2.1 | |
| with: | |
| path: packages/desktop | |
| - name: Send Release Notificaton | |
| uses: ./.github/actions/release-notifier | |
| if: always() | |
| with: | |
| os-name: Desktop | |
| version: ${{ steps.extract_version.outputs.version }} | |
| status: started | |
| slack_oauth_token: ${{ secrets.SLACK_BOT_OAUTH_TOKEN }} | |
| run-e2e-tests-linux: | |
| if: | | |
| startsWith(github.ref, 'refs/tags/@quiet/desktop') | |
| uses: ./.github/workflows/e2e-linux.yml | |
| run-e2e-tests-mac: | |
| if: | | |
| startsWith(github.ref, 'refs/tags/@quiet/desktop') | |
| uses: ./.github/workflows/e2e-mac.yml | |
| run-e2e-tests-win: | |
| if: | | |
| startsWith(github.ref, 'refs/tags/@quiet/desktop') | |
| uses: ./.github/workflows/e2e-win.yml | |
| build-linux-prod: | |
| # needs: run-e2e-tests-linux | |
| runs-on: ubuntu-22.04 | |
| if: | | |
| startsWith(github.ref, 'refs/tags/@quiet/desktop') | |
| env: | |
| TEST_MODE: ${{ github.event.action == 'prereleased' }} | |
| S3_BUCKET: ${{ github.event.action == 'released' && 'quiet.7.x' || 'test.quiet' }} | |
| CHECKSUM_PATH: ${{ github.event.action == 'released' && 'packages/desktop/dist/latest-linux.yml' || 'packages/desktop/dist/alpha-linux.yml' }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: 'recursive' | |
| - name: Extract version | |
| id: extract_version | |
| uses: Saionaro/extract-package-version@fdb5b74adc1278ddb777dfed4c988b9d098bb48d # v1.2.1 | |
| with: | |
| path: packages/desktop | |
| - name: Setup environment | |
| uses: ./.github/actions/setup-env | |
| with: | |
| bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle,helia,@quiet/node-common" | |
| - name: Install libfuse | |
| run: sudo apt install libfuse2 | |
| - name: Before build | |
| uses: ./.github/actions/before-build | |
| with: | |
| source-path: linux | |
| - name: "Set electron-builder props" | |
| run: echo "ELECTRON_BUILDER_PROPS=-c.publish.bucket=$S3_BUCKET" >> $GITHUB_ENV | |
| - name: "Release" | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| ARCH: x86_64 | |
| run: cd packages/desktop && USE_HARD_LINKS=false node_modules/.bin/electron-builder -p always --linux ${{ env.ELECTRON_BUILDER_PROPS }} | |
| - name: "Calculate new checksum for electron updater" | |
| run: lerna run postBuild --scope @quiet/desktop | |
| - name: "Push electron-updater new checksum to S3" | |
| uses: TryQuiet/upload-s3-action@c1c7c2268c91fbbc1293455e7b4bb2292267d2bd # master | |
| with: | |
| aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws_bucket: ${{ env.S3_BUCKET }} | |
| source_dir: ${{ env.CHECKSUM_PATH }} | |
| destination_dir: '' | |
| - name: Get release | |
| id: get_release | |
| uses: bruceadams/get-release@74c3d60f5a28f358ccf241a00c9021ea16f0569f # v1.3.2 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: Upload Release Assets | |
| uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| upload_url: ${{ steps.get_release.outputs.upload_url }} | |
| asset_path: ./packages/desktop/dist/Quiet-${{ steps.extract_version.outputs.version }}.AppImage | |
| asset_name: Quiet-${{ steps.extract_version.outputs.version }}.AppImage | |
| asset_content_type: application/.AppImage | |
| - name: Send Release Notificaton | |
| uses: ./.github/actions/release-notifier | |
| if: always() | |
| with: | |
| os-name: Linux | |
| version: ${{ steps.extract_version.outputs.version }} | |
| status: ${{ job.status }} | |
| slack_oauth_token: ${{ secrets.SLACK_BOT_OAUTH_TOKEN }} | |
| build-macos-prod: | |
| # needs: run-e2e-tests-mac | |
| runs-on: macos-15-intel | |
| if: | | |
| startsWith(github.ref, 'refs/tags/@quiet/desktop') | |
| env: | |
| TEST_MODE: ${{ github.event.action == 'prereleased' }} | |
| S3_BUCKET: ${{ github.event.action == 'released' && 'quiet.7.x' || 'test.quiet' }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: 'recursive' | |
| - name: Extract version | |
| id: extract_version | |
| uses: Saionaro/extract-package-version@fdb5b74adc1278ddb777dfed4c988b9d098bb48d # v1.2.1 | |
| with: | |
| path: packages/desktop | |
| - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 | |
| with: | |
| toolchain: stable | |
| components: clippy | |
| override: true | |
| - name: Setup environment | |
| uses: ./.github/actions/setup-env | |
| with: | |
| bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle,helia,@quiet/node-common" | |
| - name: Before build | |
| uses: ./.github/actions/before-build | |
| with: | |
| source-path: darwin | |
| - name: "Remove crud files" | |
| run: xattr -crs . | |
| - name: "Set electron-builder props" | |
| run: echo "ELECTRON_BUILDER_PROPS=-c.publish.bucket=$S3_BUCKET" >> $GITHUB_ENV | |
| - name: "Release" | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| CSC_KEY_PASSWORD: ${{ secrets.MAC_CSC_KEY_PASSWORD }} | |
| CSC_LINK: ${{ secrets.MAC_CSC_LINK }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_ID_PASS: ${{ secrets.APPLE_ID_PASS }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| USE_HARD_LINKS: false | |
| run: cd packages/desktop && node_modules/.bin/electron-builder -p always --mac ${{ env.ELECTRON_BUILDER_PROPS }} | |
| - name: Get release | |
| id: get_release | |
| uses: bruceadams/get-release@74c3d60f5a28f358ccf241a00c9021ea16f0569f # v1.3.2 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: Upload Release Assets | |
| uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| upload_url: ${{ steps.get_release.outputs.upload_url }} | |
| asset_path: ./packages/desktop/dist/Quiet-${{ steps.extract_version.outputs.version}}.dmg | |
| asset_name: Quiet-${{ steps.extract_version.outputs.version}}.dmg | |
| asset_content_type: application/.dmg | |
| - name: Send Release Notificaton | |
| uses: ./.github/actions/release-notifier | |
| if: always() | |
| with: | |
| os-name: MacOS | |
| version: ${{ steps.extract_version.outputs.version }} | |
| status: ${{ job.status }} | |
| slack_oauth_token: ${{ secrets.SLACK_BOT_OAUTH_TOKEN }} | |
| build-windows-prod: | |
| # needs: run-e2e-tests-win | |
| runs-on: windows-latest | |
| if: | | |
| startsWith(github.ref, 'refs/tags/@quiet/desktop') | |
| env: | |
| TEST_MODE: ${{ github.event.action == 'prereleased' }} | |
| S3_BUCKET: ${{ github.event.action == 'released' && 'quiet.7.x' || 'test.quiet' }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: 'recursive' | |
| - name: Extract version | |
| id: extract_version | |
| uses: Saionaro/extract-package-version@fdb5b74adc1278ddb777dfed4c988b9d098bb48d # v1.2.1 | |
| with: | |
| path: packages/desktop | |
| - name: "Fetch jsign" | |
| shell: bash | |
| run: cd packages/desktop && curl https://zbay-binaries.s3.us-east-2.amazonaws.com/jsign/jsign-2.1.jar --output ./jsign-2.1.jar | |
| - name: "Add Windows certificate" | |
| id: write_file | |
| uses: TryQuiet/base64-to-file@64eeb40ad3514f57de3a7dee92aee10fd42452c1 # main | |
| with: | |
| fileName: 'win-certificate.pfx' | |
| encodedString: ${{ secrets.WIN_CSC_LINK }} | |
| - name: "Remove test files workaround (jest types conflicting with cypress types)" | |
| run: find packages/desktop/src -name '*.test.*' -delete | |
| shell: bash | |
| - name: Setup environment | |
| uses: ./.github/actions/setup-env | |
| with: | |
| bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle,e2e-tests,helia,@quiet/node-common" | |
| - name: Before build | |
| uses: ./.github/actions/before-build | |
| with: | |
| source-path: win32 | |
| - name: "Set electron-builder props" | |
| shell: bash | |
| run: echo "ELECTRON_BUILDER_PROPS=-c.publish.bucket=$S3_BUCKET" >> $GITHUB_ENV | |
| - name: "Release" | |
| shell: bash | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| CERTIFICATE_PATH: ${{ steps.write_file.outputs.filePath }} | |
| WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} | |
| WINDOWS_ALIAS: ${{ secrets.WIN_ALIAS }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| USE_HARD_LINKS: false | |
| run: cd packages/desktop && node_modules/.bin/electron-builder -p always --win ${{ env.ELECTRON_BUILDER_PROPS }} | |
| - name: Get release | |
| id: get_release | |
| uses: bruceadams/get-release@74c3d60f5a28f358ccf241a00c9021ea16f0569f # v1.3.2 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: Upload Release Assets | |
| uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| upload_url: ${{ steps.get_release.outputs.upload_url }} | |
| asset_path: ./packages/desktop/dist/Quiet Setup ${{ steps.extract_version.outputs.version}}.exe | |
| asset_name: Quiet Setup ${{ steps.extract_version.outputs.version}}.exe | |
| asset_content_type: application/.exe | |
| - name: Send Release Notificaton | |
| uses: ./.github/actions/release-notifier | |
| if: always() | |
| with: | |
| os-name: Windows | |
| version: ${{ steps.extract_version.outputs.version }} | |
| status: ${{ job.status }} | |
| slack_oauth_token: ${{ secrets.SLACK_BOT_OAUTH_TOKEN }} |