-
Notifications
You must be signed in to change notification settings - Fork 7
184 lines (164 loc) · 7.57 KB
/
release.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
name: Release
on:
# push:
# branches:
# - main
# paths-ignore:
# - 'docs/**'
# - '**.md'
# - '.vscode/**'
# - '.idea/**'
workflow_dispatch:
inputs:
production-release:
description: 'Production release?'
required: true
default: 'true'
concurrency: create-release
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
packages: read
env:
PRODUCTION_RELEASE: ${{ github.ref_name == 'main' && inputs.production-release == 'true' }}
jobs:
create-release:
runs-on: [ubuntu-22.04]
name: Create release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create GitHub release
uses: ./.github/actions/create-release
id: create-github-release
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
production-release: ${{ env.PRODUCTION_RELEASE }}
node-version: 20
- name: Create draft CrabNebula release
uses: crabnebula-dev/[email protected]
id: create-crabnebula-release
if: ${{ steps.create-github-release.outputs.release-published == 'true' }}
with:
command: release draft ${{ secrets.CN_ORG_NAME }}/${{ secrets.CN_APP_NAME }} ${{ steps.create-github-release.outputs.release-version }} ${{ env.PRODUCTION_RELEASE != 'true' && '--channel beta' || '' }}
api-key: ${{ secrets.CN_API_KEY }}
- name: Get CrabNebula release ID
id: get-crabnebula-release-id
if: ${{ steps.create-github-release.outputs.release-published == 'true' }}
run: echo "release-id=${{ fromJson(steps.create-crabnebula-release.outputs.stdout).id }}" >> $GITHUB_OUTPUT
outputs:
release-published: ${{ steps.create-github-release.outputs.release-published }}
release-version: ${{ steps.create-github-release.outputs.release-version }}
release-tag: ${{ steps.create-github-release.outputs.release-tag }}
release-id: ${{ steps.create-github-release.outputs.release-id }}
crabnebula-release-id: ${{ steps.get-crabnebula-release-id.outputs.release-id }}
build-tauri:
name: Build Tauri app
needs:
- create-release
runs-on: ${{ matrix.platform }}
strategy:
matrix:
# macos-14 is the Apple Arm runner
# macos-13 is the Apple Intel runner
# platform: [ubuntu-22.04, windows-latest, macos-13, macos-14]
platform: [windows-latest, macos-13, macos-14]
if: ${{ needs.create-release.outputs.release-published == 'true' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Install npm dependencies
run: npm install
- name: Create .env file
run: |
sed -E -n 's/(VITE_[A-Z0-9_]+)=(.*)/\1="{{\1}}"/p' .env.sample > .env
- name: Substitute environment variables
uses: bluwy/substitute-string-action@v3
with:
_input-file: '.env'
_format-key: '{{key}}'
_output-file: '.env'
VITE_DISPENSER_AUTH0_DOMAIN: dispenser-prod.eu.auth0.com
VITE_DISPENSER_AUTH0_CLIENT_ID: Cg13HjvSV45pMme4dnK9yVJde8tVeDaM
VITE_DISPENSER_AUTH0_AUDIENCE: api-prod-dispenser-user
VITE_TESTNET_DISPENSER_API_URL: https://api.dispenser.algorandfoundation.tools
VITE_TESTNET_DISPENSER_ADDRESS: Z5GPJQCHVU54C2I4FLYNE2XHRQRL5OV2GPJQKXJFMW34CRIN2KRQFXF7DI
- name: Build for Linux
id: build-linux
if: ${{ runner.os == 'Linux' }}
uses: ./.github/actions/build-linux
with:
release-version: ${{ needs.create-release.outputs.release-version }}
release-tag: ${{ needs.create-release.outputs.release-tag }}
production-release: ${{ env.PRODUCTION_RELEASE }}
crabnebula-release-id: ${{ needs.create-release.outputs.crabnebula-release-id }}
appimage-signing-private-key: ${{ secrets.APPIMAGE_SIGNING_PRIVATE_KEY }}
appimage-signing-private-key-password: ${{ secrets.APPIMAGE_SIGNING_PRIVATE_KEY_PASSWORD }}
tauri-signing-public-key: ${{ secrets.TAURI_SIGNING_PUBLIC_KEY }}
tauri-signing-private-key: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
tauri-signing-private-key-password: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
crabnebula-org-name: ${{ secrets.CN_ORG_NAME }}
crabnebula-app-name: ${{ secrets.CN_APP_NAME }}
crabnebula-api-key: ${{ secrets.CN_API_KEY }}
- name: Build for Windows
id: build-windows
if: ${{ runner.os == 'Windows' }}
uses: ./.github/actions/build-windows
with:
release-version: ${{ needs.create-release.outputs.release-version }}
release-tag: ${{ needs.create-release.outputs.release-tag }}
production-release: ${{ env.PRODUCTION_RELEASE }}
crabnebula-release-id: ${{ needs.create-release.outputs.crabnebula-release-id }}
package_name: algokit-lora
azure_tenant_id: ${{ secrets.AZURE_TENANT_ID }}
azure_client_id: ${{ secrets.AZURE_CLIENT_ID }}
azure_client_secret: ${{ secrets.AZURE_CLIENT_SECRET }}
tauri-signing-public-key: ${{ secrets.TAURI_SIGNING_PUBLIC_KEY }}
tauri-signing-private-key: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
tauri-signing-private-key-password: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
crabnebula-org-name: ${{ secrets.CN_ORG_NAME }}
crabnebula-app-name: ${{ secrets.CN_APP_NAME }}
crabnebula-api-key: ${{ secrets.CN_API_KEY }}
- name: Build for Mac
id: build-mac
if: ${{ runner.os == 'macOS' }}
uses: ./.github/actions/build-mac
with:
release-version: ${{ needs.create-release.outputs.release-version }}
release-tag: ${{ needs.create-release.outputs.release-tag }}
production-release: ${{ env.PRODUCTION_RELEASE }}
crabnebula-release-id: ${{ needs.create-release.outputs.crabnebula-release-id }}
apple-certificate: ${{ secrets.APPLE_CERTIFICATE }}
apple-certificate-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }}
apple-id: ${{ secrets.APPLE_ID }}
apple-password: ${{ secrets.APPLE_PASSWORD }}
apple-team-id: ${{ secrets.APPLE_TEAM_ID }}
tauri-signing-public-key: ${{ secrets.TAURI_SIGNING_PUBLIC_KEY }}
tauri-signing-private-key: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
tauri-signing-private-key-password: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
crabnebula-org-name: ${{ secrets.CN_ORG_NAME }}
crabnebula-app-name: ${{ secrets.CN_APP_NAME }}
crabnebula-api-key: ${{ secrets.CN_API_KEY }}
publish-crabnebula:
name: Publish CrabNebula release
needs:
- create-release
- build-tauri
runs-on: [ubuntu-22.04]
if: ${{ needs.create-release.outputs.release-published == 'true' }}
steps:
- name: Publish CrabNebula release
uses: crabnebula-dev/[email protected]
with:
command: release publish "${{ secrets.CN_ORG_NAME }}/${{ secrets.CN_APP_NAME }}" "${{ needs.create-release.outputs.crabnebula-release-id }}" ${{ env.PRODUCTION_RELEASE != 'true' && '--channel beta' || '' }}
api-key: ${{ secrets.CN_API_KEY }}