Skip to content
Merged
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
21 changes: 20 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ name: Release
# The release notes, release-notes/<version>.md, are on the tag before it is pushed: they are the text of
# the GitHub release and the IntelliJ plugin's change notes, and a tag without them publishes nothing.
#
# A tag runs the workflow of the commit it points at, so this one releases the 21 line, and it refuses a tag that
# is not a 21.x: a 17.x tag on a commit of this line would publish the 21 line's jars, images and plugins under a
# version of the 17 line. A line cut from this one changes the pattern, as 17.X.X did.
#
# Needs seven repository secrets: JRELEASER_MAVENCENTRAL_USERNAME and JRELEASER_MAVENCENTRAL_PASSWORD (the
# Central Portal user token), JRELEASER_GPG_SECRET_KEY and JRELEASER_GPG_PASSPHRASE, GRADLE_PUBLISH_KEY and
# GRADLE_PUBLISH_SECRET (the Gradle Plugin Portal key) and JETBRAINS_MARKETPLACE_TOKEN (a permanent token of
Expand All @@ -39,7 +43,7 @@ jobs:
# the publish job waits for this one. The IDE does not render Markdown. GitHub's Markdown API renders the
# notes as GitHub renders a release, with the runner's gh and jq, so the build needs no converter; sed then
# drops the attributes GitHub adds for its own pages, such as its hovercards'. release-notes/README.md says
# how to write them.
# how to write them. The job refuses a tag of another release line first, so every job that builds waits for it.
release-notes:
name: release notes
runs-on: ubuntu-latest
Expand All @@ -48,6 +52,18 @@ jobs:
with:
persist-credentials: false

- name: Refuse a tag of another release line
env:
VERSION: ${{ github.ref_name }}
run: |
case "$VERSION" in
21.*) ;;
*)
echo "::error::${VERSION} is not a version of the 21 line, whose tags are 21.<minor>.<build>"
exit 1
;;
esac

# The shell named, since only then does GitHub run bash with pipefail: a failed gh api fails the step
# instead of leaving sed an empty file.
- name: Render the release notes for the IDE
Expand Down Expand Up @@ -77,6 +93,7 @@ jobs:

jars:
name: jars
needs: release-notes
runs-on: ubuntu-latest
outputs:
deployment-id: ${{ steps.deployment.outputs.id }}
Expand Down Expand Up @@ -123,6 +140,7 @@ jobs:
# instead of throwing it away. macOS on Apple silicon is built here only: ci.yml leaves it out.
native-images:
name: native image (${{ matrix.runner }})
needs: release-notes
runs-on: ${{ matrix.runner }}
timeout-minutes: 90
# bash on Windows too, as in ci.yml.
Expand Down Expand Up @@ -288,6 +306,7 @@ jobs:
# failure here holds back nothing else, and "Re-run failed jobs" builds it again and then opens the draft.
wasm:
name: wasm
needs: release-notes
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
Expand Down
Loading