Skip to content

Commit 3323cd9

Browse files
author
ADFA
committed
Daily merge from stage to main
2 parents 6053911 + 1d7fe53 commit 3323cd9

4 files changed

Lines changed: 276 additions & 93 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Release plugin-api (manual)
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
9+
concurrency:
10+
group: release-plugin-api
11+
cancel-in-progress: false
12+
13+
jobs:
14+
15+
release-plugin-api:
16+
runs-on: self-hosted
17+
permissions:
18+
contents: write
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
ref: main
23+
persist-credentials: false
24+
25+
- name: Build plugin-api jar
26+
run: |
27+
flox activate -d flox/base -- \
28+
./gradlew --console=plain --no-daemon :plugin-api:createPluginApiJar
29+
30+
- name: Build plugin-builder jar
31+
run: |
32+
flox activate -d flox/base -- \
33+
./gradlew --console=plain --no-daemon -p plugin-api/plugin-builder :jar
34+
35+
- name: Stage plugin-api release assets
36+
run: |
37+
mkdir -p .release
38+
cp plugin-api/build/libs/plugin-api-*.jar .release/plugin-api.jar
39+
cp plugin-api/plugin-builder/build/libs/plugin-builder-*.jar .release/gradle-plugin.jar
40+
( cd .release && sha256sum plugin-api.jar gradle-plugin.jar > checksums.txt )
41+
ls -la .release
42+
43+
- name: Replace plugin-api-latest release
44+
env:
45+
GH_TOKEN: ${{ github.token }}
46+
shell: flox activate -d flox/base -- bash -eo pipefail {0}
47+
run: |
48+
TARGET_SHA="$(git rev-parse HEAD)"
49+
if gh release view plugin-api-latest >/dev/null 2>&1; then
50+
gh release delete plugin-api-latest --cleanup-tag --yes
51+
sleep 10
52+
fi
53+
gh release create plugin-api-latest \
54+
--target "$TARGET_SHA" \
55+
--title "plugin-api (latest)" \
56+
--notes "built from ${TARGET_SHA} on $(date -u +'%Y-%m-%d %H:%M:%S UTC')" \
57+
.release/plugin-api.jar \
58+
.release/gradle-plugin.jar \
59+
.release/checksums.txt

.github/workflows/weekly-release.yml

Lines changed: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
with:
2525
ref: main
2626
fetch-depth: 0
27+
persist-credentials: false
2728

2829
- name: Compute CalVer version
2930
id: compute
@@ -38,6 +39,7 @@ jobs:
3839
id: previous
3940
env:
4041
GH_TOKEN: ${{ github.token }}
42+
shell: flox activate -d flox/base -- bash -eo pipefail {0}
4143
run: |
4244
PREVIOUS_TAG=$(gh release list --json tagName \
4345
--jq '[.[] | select(.tagName | test("^[0-9]+\\.[0-9]+$"))] | .[0].tagName // ""')
@@ -62,49 +64,6 @@ jobs:
6264
echo "version_id=$VERSION_ID" >> "$GITHUB_OUTPUT"
6365
echo "Jira version $VERSION → id $VERSION_ID"
6466
65-
release-plugin-api:
66-
needs: prepare
67-
runs-on: self-hosted
68-
permissions:
69-
contents: write
70-
steps:
71-
- uses: actions/checkout@v4
72-
with:
73-
ref: main
74-
75-
- name: Build plugin-api jar
76-
run: |
77-
flox activate -d flox/base -- \
78-
./gradlew --console=plain --no-daemon :plugin-api:createPluginApiJar
79-
80-
- name: Build plugin-builder jar
81-
run: |
82-
flox activate -d flox/base -- \
83-
./gradlew --console=plain --no-daemon -p plugin-api/plugin-builder :jar
84-
85-
- name: Stage plugin-api release assets
86-
run: |
87-
mkdir -p .release
88-
cp plugin-api/build/libs/plugin-api-*.jar .release/plugin-api.jar
89-
cp plugin-api/plugin-builder/build/libs/plugin-builder-*.jar .release/gradle-plugin.jar
90-
( cd .release && sha256sum plugin-api.jar gradle-plugin.jar > checksums.txt )
91-
ls -la .release
92-
93-
- name: Replace plugin-api-latest release
94-
env:
95-
GH_TOKEN: ${{ github.token }}
96-
run: |
97-
if gh release view plugin-api-latest >/dev/null 2>&1; then
98-
gh release delete plugin-api-latest --cleanup-tag --yes
99-
fi
100-
gh release create plugin-api-latest \
101-
--target "$GITHUB_SHA" \
102-
--title "plugin-api (latest)" \
103-
--notes "built from ${GITHUB_SHA} on $(date -u +'%Y-%m-%d %H:%M:%S UTC')" \
104-
.release/plugin-api.jar \
105-
.release/gradle-plugin.jar \
106-
.release/checksums.txt
107-
10867
pull-apk:
10968
needs: prepare
11069
runs-on: self-hosted
@@ -121,6 +80,7 @@ jobs:
12180
- uses: actions/checkout@v4
12281
with:
12382
ref: main
83+
persist-credentials: false
12484

12585
- name: Reset staging directory
12686
run: |
@@ -218,7 +178,7 @@ jobs:
218178
run: rm -rf "$STAGING_DIR"
219179

220180
release-codeonthego:
221-
needs: [prepare, pull-apk, release-plugin-api]
181+
needs: [prepare, pull-apk]
222182
runs-on: self-hosted
223183
permissions:
224184
contents: write
@@ -227,12 +187,14 @@ jobs:
227187
with:
228188
ref: main
229189
fetch-depth: 0
190+
persist-credentials: false
230191

231192
- name: Tag and create GitHub Release (idempotent)
232193
env:
233194
GH_TOKEN: ${{ github.token }}
234195
VERSION: ${{ needs.prepare.outputs.version }}
235196
PREVIOUS_TAG: ${{ needs.prepare.outputs.previous_tag }}
197+
shell: flox activate -d flox/base -- bash -eo pipefail {0}
236198
run: |
237199
if gh release view "$VERSION" >/dev/null 2>&1; then
238200
echo "Release $VERSION already exists; skipping creation."
@@ -304,6 +266,11 @@ jobs:
304266
contents: read
305267
actions: write
306268
steps:
269+
- uses: actions/checkout@v4
270+
with:
271+
ref: main
272+
persist-credentials: false
273+
307274
- name: Close Jira version (idempotent)
308275
env:
309276
JIRA_EMAIL: ${{ secrets.JIRA_EMAIL }}
@@ -329,6 +296,7 @@ jobs:
329296
env:
330297
GH_TOKEN: ${{ steps.app-token.outputs.token }}
331298
NEXT_VERSION: ${{ needs.prepare.outputs.next_version }}
299+
shell: flox activate -d flox/base -- bash -eo pipefail {0}
332300
run: |
333301
gh variable set NEXT_RELEASE_VERSION --body "$NEXT_VERSION" --repo "$GITHUB_REPOSITORY"
334302
echo "NEXT_RELEASE_VERSION set to $NEXT_VERSION"

0 commit comments

Comments
 (0)