Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/release-plugin-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release plugin-api (manual)

on:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: release-plugin-api
cancel-in-progress: false

jobs:

release-plugin-api:
runs-on: self-hosted
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
Comment thread
coderabbitai[bot] marked this conversation as resolved.
ref: main
Comment thread
Daniel-ADFA marked this conversation as resolved.
persist-credentials: false

- name: Build plugin-api jar
run: |
flox activate -d flox/base -- \
./gradlew --console=plain --no-daemon :plugin-api:createPluginApiJar

- name: Build plugin-builder jar
run: |
flox activate -d flox/base -- \
./gradlew --console=plain --no-daemon -p plugin-api/plugin-builder :jar

- name: Stage plugin-api release assets
run: |
mkdir -p .release
cp plugin-api/build/libs/plugin-api-*.jar .release/plugin-api.jar
cp plugin-api/plugin-builder/build/libs/plugin-builder-*.jar .release/gradle-plugin.jar
( cd .release && sha256sum plugin-api.jar gradle-plugin.jar > checksums.txt )
ls -la .release

- name: Replace plugin-api-latest release
env:
GH_TOKEN: ${{ github.token }}
shell: flox activate -d flox/base -- bash -eo pipefail {0}
run: |
TARGET_SHA="$(git rev-parse HEAD)"
if gh release view plugin-api-latest >/dev/null 2>&1; then
gh release delete plugin-api-latest --cleanup-tag --yes
sleep 10
fi
gh release create plugin-api-latest \
Comment thread
Daniel-ADFA marked this conversation as resolved.
--target "$TARGET_SHA" \
--title "plugin-api (latest)" \
--notes "built from ${TARGET_SHA} on $(date -u +'%Y-%m-%d %H:%M:%S UTC')" \
.release/plugin-api.jar \
.release/gradle-plugin.jar \
.release/checksums.txt
56 changes: 12 additions & 44 deletions .github/workflows/weekly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
with:
ref: main
fetch-depth: 0
persist-credentials: false

- name: Compute CalVer version
id: compute
Expand All @@ -38,6 +39,7 @@ jobs:
id: previous
env:
GH_TOKEN: ${{ github.token }}
shell: flox activate -d flox/base -- bash -eo pipefail {0}
run: |
PREVIOUS_TAG=$(gh release list --json tagName \
--jq '[.[] | select(.tagName | test("^[0-9]+\\.[0-9]+$"))] | .[0].tagName // ""')
Expand All @@ -62,49 +64,6 @@ jobs:
echo "version_id=$VERSION_ID" >> "$GITHUB_OUTPUT"
echo "Jira version $VERSION → id $VERSION_ID"

release-plugin-api:
needs: prepare
runs-on: self-hosted
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: main

- name: Build plugin-api jar
run: |
flox activate -d flox/base -- \
./gradlew --console=plain --no-daemon :plugin-api:createPluginApiJar

- name: Build plugin-builder jar
run: |
flox activate -d flox/base -- \
./gradlew --console=plain --no-daemon -p plugin-api/plugin-builder :jar

- name: Stage plugin-api release assets
run: |
mkdir -p .release
cp plugin-api/build/libs/plugin-api-*.jar .release/plugin-api.jar
cp plugin-api/plugin-builder/build/libs/plugin-builder-*.jar .release/gradle-plugin.jar
( cd .release && sha256sum plugin-api.jar gradle-plugin.jar > checksums.txt )
ls -la .release

- name: Replace plugin-api-latest release
env:
GH_TOKEN: ${{ github.token }}
run: |
if gh release view plugin-api-latest >/dev/null 2>&1; then
gh release delete plugin-api-latest --cleanup-tag --yes
fi
gh release create plugin-api-latest \
--target "$GITHUB_SHA" \
--title "plugin-api (latest)" \
--notes "built from ${GITHUB_SHA} on $(date -u +'%Y-%m-%d %H:%M:%S UTC')" \
.release/plugin-api.jar \
.release/gradle-plugin.jar \
.release/checksums.txt

pull-apk:
needs: prepare
runs-on: self-hosted
Expand All @@ -121,6 +80,7 @@ jobs:
- uses: actions/checkout@v4
with:
ref: main
persist-credentials: false

- name: Reset staging directory
run: |
Expand Down Expand Up @@ -218,7 +178,7 @@ jobs:
run: rm -rf "$STAGING_DIR"

release-codeonthego:
needs: [prepare, pull-apk, release-plugin-api]
needs: [prepare, pull-apk]
runs-on: self-hosted
permissions:
contents: write
Expand All @@ -227,12 +187,14 @@ jobs:
with:
ref: main
fetch-depth: 0
persist-credentials: false

- name: Tag and create GitHub Release (idempotent)
env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ needs.prepare.outputs.version }}
PREVIOUS_TAG: ${{ needs.prepare.outputs.previous_tag }}
shell: flox activate -d flox/base -- bash -eo pipefail {0}
run: |
if gh release view "$VERSION" >/dev/null 2>&1; then
echo "Release $VERSION already exists; skipping creation."
Expand Down Expand Up @@ -304,6 +266,11 @@ jobs:
contents: read
actions: write
steps:
- uses: actions/checkout@v4
with:
ref: main
persist-credentials: false

Comment thread
Daniel-ADFA marked this conversation as resolved.
- name: Close Jira version (idempotent)
env:
JIRA_EMAIL: ${{ secrets.JIRA_EMAIL }}
Expand All @@ -329,6 +296,7 @@ jobs:
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
NEXT_VERSION: ${{ needs.prepare.outputs.next_version }}
shell: flox activate -d flox/base -- bash -eo pipefail {0}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
run: |
gh variable set NEXT_RELEASE_VERSION --body "$NEXT_VERSION" --repo "$GITHUB_REPOSITORY"
echo "NEXT_RELEASE_VERSION set to $NEXT_VERSION"
Loading
Loading