Generate Upgrade Test Data #40
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: Generate Upgrade Test Data | |
on: | |
workflow_dispatch: {} | |
permissions: | |
contents: read | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- platform: mac | |
arch: x86_64 | |
runs-on: macos-13 | |
- platform: mac | |
arch: aarch64 | |
runs-on: macos-latest | |
- platform: win | |
runs-on: windows-latest | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
# Needed to run `git describe` to get full version info | |
fetch-depth: 0 | |
- uses: ./.github/actions/yarn-install | |
- run: yarn build | |
- run: yarn package | |
- name: Upload Windows installer | |
if: runner.os == 'Windows' | |
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
with: | |
name: Rancher Desktop Setup.msi | |
path: dist/Rancher.Desktop*.msi | |
if-no-files-found: error | |
- if: runner.os == 'Windows' | |
run: cat dist/electron-builder.yaml | |
- name: Upload Windows build information | |
if: runner.os == 'Windows' | |
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
with: | |
name: build-info.yml | |
path: dist/electron-builder.yaml | |
if-no-files-found: error | |
- name: Upload macOS archive | |
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
if: matrix.platform == 'mac' | |
with: | |
name: Rancher Desktop-mac.${{ matrix.arch }}.zip | |
path: dist/Rancher Desktop*.zip | |
if-no-files-found: error | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
- uses: ./.github/actions/yarn-install | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: gh-pages | |
path: pages | |
persist-credentials: true | |
- name: Download installer (msi) | |
id: msi | |
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 | |
with: | |
name: Rancher Desktop Setup.msi | |
path: RD_SETUP_MSI | |
- name: Download mac x86_64 archive | |
id: mac_x86_64 | |
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 | |
with: | |
name: Rancher Desktop-mac.x86_64.zip | |
path: MACX86_ZIP | |
- name: Download mac aarch64 archive | |
id: mac_aarch64 | |
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 | |
with: | |
name: Rancher Desktop-mac.aarch64.zip | |
path: MACARM_ZIP | |
- name: Download build information | |
id: info | |
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 | |
with: | |
name: build-info.yml | |
path: RD_BUILD_INFO | |
- run: node scripts/ts-wrapper.js scripts/populate-update-server.ts | |
env: | |
RD_SETUP_MSI: ${{ steps.msi.outputs.download-path }} | |
RD_MACX86_ZIP: ${{ steps.mac_x86_64.outputs.download-path }} | |
RD_MACARM_ZIP: ${{ steps.mac_aarch64.outputs.download-path }} | |
RD_BUILD_INFO: ${{ steps.info.outputs.download-path }} | |
RD_OUTPUT_DIR: ${{ github.workspace }}/pages | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_ACTOR: ${{ github.actor }} |