forked from rancher-sandbox/rancher-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (126 loc) · 3.78 KB
/
upgrade-generate.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
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@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-file: package.json
cache: yarn
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: actions/setup-go@v5
with:
go-version-file: go.work
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-file: package.json
cache: yarn
- uses: actions/setup-go@v5
with:
go-version-file: go.work
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 }}