Skip to content
Merged
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
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,36 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: gh release edit "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --draft=false --latest

# JitPack builds a tag on its first request, which can outlast a Gradle download timeout. Ask for it here, so the
# extensions-source pin bump (opened by Renovate on the new release) resolves the artifacts at once.
jitpack:
name: Build the artifacts on JitPack
needs: release
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
steps:
- name: Checkout tag
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Request the tag's artifacts until JitPack serves them
run: |
base="https://jitpack.io/com/github/${GITHUB_REPOSITORY%%/*}/${GITHUB_REPOSITORY#*/}"
modules=(contract)
for dir in api/*/; do modules+=("api-$(basename "$dir")"); done
for module in "${modules[@]}"; do
url="$base/$module/$GITHUB_REF_NAME/$module-$GITHUB_REF_NAME.pom"
for _ in $(seq 1 25); do
if curl -sf -o /dev/null --max-time 300 "$url"; then
echo "$module $GITHUB_REF_NAME is on JitPack"
continue 2
fi
sleep 60
done
echo "::error::JitPack doesn't serve $module $GITHUB_REF_NAME: https://jitpack.io/com/github/${GITHUB_REPOSITORY}/$GITHUB_REF_NAME/build.log"
exit 1
done
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ JitPack builds the `contract` and `api-*` artifacts for a tag when someone first
(`jitpack.yml`; PR checks run the same `publishToMavenLocal`). Consumers can also request a
commit hash instead of a tag (`com.github.keiyoushi.runtime:contract:<commit>`), so a fix to
the published libraries alone doesn't need a runtime release.
After a release, `release.yml` requests the tag's artifacts until JitPack serves them, so
Renovate's pin bump in extensions-source resolves them at once.

The signing secrets (`KEYSTORE_B64`, `KEYSTORE_PASSWORD`, `KEY_ALIAS`, `KEY_PASSWORD`) belong in
the `release` environment (Settings → Environments), not in the repository's secrets. A repo
Expand Down