forked from shauninman/MinUI
-
Notifications
You must be signed in to change notification settings - Fork 66
228 lines (194 loc) · 5.96 KB
/
release.yaml
File metadata and controls
228 lines (194 loc) · 5.96 KB
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
---
name: Release NextUI
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
inputs:
release_type:
description: "release type"
default: "patch"
required: true
type: choice
options:
- patch
- minor
- major
permissions:
attestations: write
contents: write
id-token: write
jobs:
prepare:
runs-on: ubuntu-24.04
outputs:
next-tag: ${{ steps.next-tag.outputs.version }}
release-name: ${{ steps.release-name.outputs.RELEASE_NAME }}
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Generate Release Name
id: release-name
run: |
echo "RELEASE_NAME=$(make name)" >> "$GITHUB_OUTPUT"
- name: Get Latest Tag
id: latest-tag
run: |
echo GIT_LATEST_TAG="$(git describe --tags "$(git rev-list --tags --max-count=1)")" >>"$GITHUB_OUTPUT"
- name: Compute Next Tag
id: next-tag
uses: docker://ghcr.io/dokku/semver-generator:latest
with:
bump: ${{ github.event.inputs.release_type }}
input: ${{ steps.latest-tag.outputs.GIT_LATEST_TAG }}
core-matrix:
runs-on: ubuntu-24.04-arm
env:
PLATFORM: ${{ matrix.toolchain }}
outputs:
cores: ${{ steps.cores.outputs.cores }}
strategy:
fail-fast: true
matrix:
toolchain:
- tg5040
- tg5050
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
- name: Generate cores matrix
id: cores
run: |
CORES="$(make cores-json)"
echo "cores=$CORES" >> $GITHUB_OUTPUT
build-core:
needs: core-matrix
runs-on: ubuntu-24.04-arm
env:
PLATFORM: ${{ matrix.toolchain }}
strategy:
fail-fast: true
matrix:
toolchain:
- tg5040
- tg5050
core: ${{ fromJson(needs.core-matrix.outputs.cores) }}
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
- name: Setup
run: make setup
- name: Build ${{ matrix.core }} core
run: make build-core CORE=${{ matrix.core }}
- name: Upload core
uses: actions/upload-artifact@v4.6.2
with:
name: core-${{ matrix.toolchain }}-${{ matrix.core }}.zip
path: workspace/${{ env.PLATFORM }}/cores/output/
build:
needs:
- prepare
- build-core
runs-on: ubuntu-24.04-arm
env:
RELEASE_NAME: ${{ needs.prepare.outputs.release-name }}
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y zipmerge
- name: Setup
run: make setup
- name: Download Cores (tg5040)
uses: actions/download-artifact@v4.3.0
with:
path: workspace/tg5040/cores/output/
pattern: core-tg5040-*
merge-multiple: true
- name: Build (tg5040)
run: make tg5040
env:
PLATFORM: tg5040
- name: Download Cores (tg5050)
uses: actions/download-artifact@v4.3.0
with:
path: workspace/tg5050/cores/output/
pattern: core-tg5050-*
merge-multiple: true
- name: Build (tg5050)
run: make tg5050
env:
PLATFORM: tg5050
- name: Special
run: make special
- name: Package
run: make package
- name: Upload All
uses: actions/upload-artifact@v4.6.2
with:
name: ${{ env.RELEASE_NAME }}-all.zip
path: releases/${{ env.RELEASE_NAME }}-all.zip
- name: Upload Base
uses: actions/upload-artifact@v4.6.2
with:
name: ${{ env.RELEASE_NAME }}-base.zip
path: releases/${{ env.RELEASE_NAME }}-base.zip
- name: Upload Extras
uses: actions/upload-artifact@v4.6.2
with:
name: ${{ env.RELEASE_NAME }}-extras.zip
path: releases/${{ env.RELEASE_NAME }}-extras.zip
- name: Skip Attest for PRs from forks
id: skip
if: github.ref != 'refs/heads/main'
run: |
echo '::warning title=Attest skipped::Attest action requires permissions and is performed only for main branch.'
- name: Attest Build Provenance
uses: actions/attest-build-provenance@v2.3.0
if: github.ref == 'refs/heads/main'
with:
subject-path: |
releases/${{ env.RELEASE_NAME }}-all.zip
releases/${{ env.RELEASE_NAME }}-base.zip
releases/${{ env.RELEASE_NAME }}-extras.zip
release:
needs:
- build
- prepare
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Download Release Artifacts
uses: actions/download-artifact@v4.3.0
with:
path: releases/
pattern: NextUI-*
merge-multiple: true
- name: Create and Push Tag
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
git tag "$GIT_NEXT_TAG"
git push origin "$GIT_NEXT_TAG"
env:
GIT_NEXT_TAG: ${{ needs.prepare.outputs.next-tag }}
- name: Release
uses: softprops/action-gh-release@v2
with:
files: releases/*
generate_release_notes: true
append_body: true
tag_name: ${{ needs.prepare.outputs.next-tag }}
make_latest: "true"
body: |
For full features list and help on how to use etc of NextUI:
https://nextui.loveretro.games/docs/
## How to install/update
For a fresh installation, follow the instructions here: https://nextui.loveretro.games/getting-started/installation/
When updating from a previous release: https://nextui.loveretro.games/getting-started/updating/