-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace automatic releases with manual trigger
We used Shipkit for a continuous delivery model, where every change on the `master` branch (for example when merging a pull request) triggered a release build that published a new version if specific criteria were met. Because this project's development often happens in sporadic bursts, where a lot of PRs are merged within a few hours, this approach lead to some superfluous releases. We also weren't 100% successful in predicting whether Shipkit would make a release and so we started cluttering our commit messages with `[ci skip-release]`, which was a bit annoying. Hence the change to a new release model. With this change, we no longer release on every commit to `master`. Instead, releases must be triggered manually by pushing a tag `releaseTrigger` to `master`. GitHub Actions will then tell Shipkit to do its thing and afterwards delete the tag. See issue #193 for a discussion of other option to trigger a release. This change also triggers a site build on successful release, which finishes the move from Travis CI to GitHub actions. Closes: #193, #192 PR: #256
- Loading branch information
Showing
3 changed files
with
69 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
|
||
name: Release | ||
|
||
on: | ||
create: | ||
tags: | ||
- 'releaseTrigger' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: releasing | ||
steps: | ||
- name: Wait For Other Builds To Succeed | ||
# This steps waits for all github actions builds to suceed, before continuing. | ||
# Currently we only have our default action, so we can ensure, | ||
# that our codebase builds correctly | ||
uses: jitterbit/await-check-suites@v1 | ||
with: | ||
appSlugFilter: 'github-actions' | ||
timeoutSeconds: '300' | ||
- uses: actions/checkout@v2 | ||
- name: Setup java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 8 | ||
- name: Perform Release | ||
uses: eskatos/gradle-command-action@v1 | ||
env: | ||
# shipkit does not support GitHub Actions for now, hence that we simulate to be Travis CI | ||
TRAVIS_BRANCH: master | ||
TRAVIS_COMMIT_MESSAGE: <no commit message, not needed, we do not care about them, if we trigger or not> | ||
TRAVIS_PULL_REQUEST: false | ||
GH_WRITE_TOKEN: ${{ secrets.GH_WRITE_TOKEN }} | ||
BINTRAY_USER_NAME: ${{ secrets.BINTRAY_USER_NAME }} | ||
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }} | ||
NEXUS_TOKEN_USERNAME: ${{ secrets.NEXUS_TOKEN_USERNAME }} | ||
NEXUS_TOKEN_PASSWORD: ${{ secrets.NEXUS_TOKEN_PASSWORD }} | ||
with: | ||
arguments: ciPerformRelease | ||
- name: Delete Tag | ||
if: ${{ always() }} | ||
run: git push --delete origin releaseTrigger | ||
- name: Trigger Website Build | ||
uses: peter-evans/repository-dispatch@v1 | ||
with: | ||
token: ${{ secrets.GH_WRITE_TOKEN }} | ||
repository: junit-pioneer/junit-pioneer.github.io | ||
event-type: triggerSiteBuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters