generated from creek-service/multi-module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release prep: update to new release conventions (#75)
- Loading branch information
1 parent
78ead0c
commit 0a23b97
Showing
18 changed files
with
486 additions
and
226 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
### Labels | ||
Mark your PRs with the following labels, as appropriate: | ||
- `breaking-change`: if the PR includes a breaking change | ||
- `enhancement`: if the PR enables / completes a new feature | ||
- `bug`: if the PR fixes a bug. | ||
- `dependencies`: if the PR updates dependencies | ||
- `documentation **`: If the PR doc-only changes | ||
- `subtask **`: If the PR is only part of a new feature. Ensure final PR is marked with `enhancement`. | ||
- `chore **`: a maintenance / non-feature released task of no interest to users. | ||
|
||
Labels marked with `**` are excluded from release notes | ||
|
||
### Reviewer checklist | ||
- [ ] Ensure relevant issues are linked (description should include text like "Fixes #<issue number>") | ||
- [ ] Ensure correct labels applied | ||
- [ ] Ensure any appropriate documentation has been added or amended |
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,21 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- documentation | ||
- subtask | ||
- chore | ||
categories: | ||
- title: Breaking Changes 🛠 | ||
labels: [ breaking-change ] | ||
|
||
- title: Exciting New Features 🎉 | ||
labels: [ enhancement ] | ||
|
||
- title: Bug Fixes 🎉 | ||
labels: [ bug ] | ||
|
||
- title: Dependency Updates | ||
labels: [ dependencies ] | ||
|
||
- title: Less Exciting Things | ||
labels: [ "*" ] |
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,63 @@ | ||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
tags: [ "v*.*.*" ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
inputs: | ||
publish_artifacts: | ||
description: "Publish release artifacts: true or false?" | ||
default: "true" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Fetch version history | ||
# Do NOT want to fetch all tags if build specific tag. | ||
# Doing so could result in code published with wrong version, if newer tags have been pushed | ||
if: (!startsWith(github.ref, 'refs/tags/')) | ||
run: git fetch --tag --unshallow | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
cache: gradle | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
run: ./gradlew javadoc check coveralls | ||
- name: Publish | ||
if: github.event_name == 'push' || github.event.inputs.publish_artifacts == 'true' | ||
env: | ||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }} | ||
ORG_GRADLE_PROJECT_SONA_USERNAME: ${{ secrets.SONA_USERNAME }} | ||
ORG_GRADLE_PROJECT_SONA_PASSWORD: ${{ secrets.SONA_PASSWORD }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
./gradlew cV | ||
./gradlew publish closeAndReleaseStagingRepository | ||
create-gh-release: | ||
if: startsWith(github.ref, 'refs/tags/') && !endsWith(github.ref, '-alpha') | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Create GitHut Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
generate_release_notes: true |
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 was deleted.
Oops, something went wrong.
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,33 @@ | ||
# A Workflow for triggering a new release. | ||
|
||
name: Release | ||
|
||
on: [workflow_dispatch] | ||
|
||
concurrency: "${{ github.repository }}-versioning" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
token: ${{ secrets.TRIGGER_GITHUB_TOKEN }} | ||
- name: Fetch version history | ||
run: git fetch --tags --unshallow | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
cache: gradle | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Ensure build is green | ||
run: ./gradlew check | ||
- name: Release | ||
run: | | ||
# The following command will trigger the build.yml workflow as it pushes a release tag | ||
./gradlew release | ||
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 |
---|---|---|
@@ -1,18 +1,27 @@ | ||
name: Version | ||
# A Workflow for adjusting the version number of the next release | ||
|
||
name: Set next version | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
part: | ||
description: "Part to increment: Major, Minor or Patch" | ||
description: "Part to increment: Major, Minor, Patch or the next release, e.g. 1.2.3" | ||
required: true | ||
default: Patch | ||
default: Minor | ||
|
||
concurrency: "${{ github.repository }}-versioning" | ||
|
||
jobs: | ||
version: | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/[email protected] | ||
with: | ||
token: ${{ secrets.TRIGGER_GITHUB_TOKEN }} | ||
- name: Fetch version history | ||
run: git fetch --tags --unshallow | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
|
@@ -21,12 +30,13 @@ jobs: | |
cache: gradle | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Increment Version Part | ||
- name: Increment version | ||
if: contains(fromJson('["Major", "Minor", "Patch"]'), github.event.inputs.part) | ||
run: | | ||
git fetch --tags --unshallow | ||
# The following command will trigger the build.yml workflow as it pushes a alpha tag | ||
./gradlew markNextVersion -Prelease.incrementer=increment${{ github.event.inputs.part }} | ||
- name: Trigger Build | ||
- name: Set next version | ||
if: (!contains(fromJson('["Major", "Minor", "Patch"]'), github.event.inputs.part)) | ||
run: | | ||
curl -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${GITHUB_TOKEN}" "https://api.github.com/repos/${{ github.repository }}/actions/workflows/gradle.yml/dispatches" -d '{"ref":"main","inputs":{"publish":"true"}}' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TRIGGER_GITHUB_TOKEN }} | ||
# The following command will trigger the build.yml workflow as it pushes a alpha tag | ||
./gradlew markNextVersion -Prelease.version=${{ github.event.inputs.part }} |
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 |
---|---|---|
|
@@ -10,3 +10,6 @@ out | |
*.ipr | ||
*.iws | ||
.idea | ||
|
||
# Apple | ||
**/.DS_Store |
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
Oops, something went wrong.