Generate Upgrade Test Data #37
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: Generate Upgrade Test Data | |
on: | |
workflow_dispatch: {} | |
permissions: | |
contents: read | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- platform: mac | |
arch: x86_64 | |
runs-on: macos-11 | |
- platform: mac | |
arch: aarch64 | |
runs-on: macos-11 | |
- platform: win | |
runs-on: windows-latest | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
# Needed to run `git describe` to get full version info | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18.16.x' | |
cache: yarn | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '^1.21' | |
cache-dependency-path: src/go/**/go.sum | |
- name: Install Windows dependencies | |
if: runner.os == 'Windows' | |
shell: powershell | |
run: .\scripts\windows-setup.ps1 -SkipVisualStudio -SkipTools | |
- name: Flag build for M1 | |
if: matrix.arch == 'aarch64' && matrix.platform == 'mac' | |
run: echo "M1=1" >> "${GITHUB_ENV}" | |
- run: pip install setuptools | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
- run: yarn package | |
- name: Upload Windows installer | |
if: runner.os == 'Windows' | |
uses: actions/upload-artifact@v4 | |
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@v4 | |
with: | |
name: build-info.yml | |
path: dist/electron-builder.yaml | |
if-no-files-found: error | |
- name: Upload macOS archive | |
uses: actions/upload-artifact@v4 | |
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@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
path: pages | |
persist-credentials: true | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18.16.x' | |
cache: yarn | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '^1.21' | |
cache-dependency-path: src/go/**/go.sum | |
- run: yarn install --frozen-lockfile | |
- name: Download installer (msi) | |
id: msi | |
uses: actions/download-artifact@v4 | |
with: | |
name: Rancher Desktop Setup.msi | |
path: RD_SETUP_MSI | |
- name: Download mac x86_64 archive | |
id: mac_x86_64 | |
uses: actions/download-artifact@v4 | |
with: | |
name: Rancher Desktop-mac.x86_64.zip | |
path: MACX86_ZIP | |
- name: Download mac aarch64 archive | |
id: mac_aarch64 | |
uses: actions/download-artifact@v4 | |
with: | |
name: Rancher Desktop-mac.aarch64.zip | |
path: MACARM_ZIP | |
- name: Download build information | |
id: info | |
uses: actions/download-artifact@v4 | |
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 }} |