-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds publishing workflow to publish artifacts and create a github rel…
…ease on tag
- Loading branch information
1 parent
09bafc6
commit 4b33677
Showing
5 changed files
with
99 additions
and
46 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"categories": [ | ||
{ | ||
"title": "## 🔨 Fixes and Improvements", | ||
"labels": [ | ||
"bug", | ||
"enhancement" | ||
] | ||
} | ||
], | ||
"ignore_labels": [], | ||
"template": "${{CHANGELOG}}\n---\n${{UNCATEGORIZED}}", | ||
"pr_template": "- ${{TITLE}} (PR: #${{NUMBER}})", | ||
"empty_template": "- no changes", | ||
"label_extractor": [], | ||
"transformers": [], | ||
"exclude_merge_branches": [] | ||
} |
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 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
unit_test: | ||
name: Run Unit Tests | ||
uses: ./.github/workflows/unit-test.yml | ||
|
||
publish_to_maven_central: | ||
name: Publish to Maven Central Repository | ||
needs: | ||
- unit_test | ||
runs-on: ubuntu-latest | ||
environment: production | ||
timeout-minutes: 15 | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Publish to Maven Central Staging Repository | ||
env: | ||
LIBRARY_RELEASE_MODE: true | ||
MAVEN_CENTRAL_USER: ${{ secrets.MAVEN_CENTRAL_USER }} | ||
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | ||
RELEASE_SIGNING_KEY_ID: ${{ secrets.RELEASE_SIGNING_KEY_ID }} | ||
RELEASE_SIGNING_KEY: ${{ secrets.RELEASE_SIGNING_KEY }} | ||
RELEASE_SIGNING_KEY_PASSWORD: ${{ secrets.RELEASE_SIGNING_KEY_PASSWORD }} | ||
run: ./gradlew scratchoff:publishReleasePublicationToMavenCentralRepository | ||
|
||
create_release_for_tag: | ||
name: Create Github Release | ||
needs: | ||
- publish_to_maven_central | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
environment: production | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Generate Github App Token for Release Creation Access | ||
uses: tibdex/[email protected] | ||
id: generate_release_token | ||
with: | ||
app_id: ${{ secrets.APP_RELEASES_APP_ID }} | ||
private_key: ${{ secrets.APP_RELEASES_APP_PRIVATE_KEY }} | ||
|
||
- name: Generate Changelog for Release Body | ||
id: generate_changelog | ||
uses: mikepenz/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
configuration: ".github/changelog_config.json" | ||
toTag: ${{ github.sha }} | ||
|
||
- name: Create Release For Tag | ||
uses: ncipollo/[email protected] | ||
with: | ||
token: ${{ steps.generate_release_token.outputs.token }} | ||
body: ${{ steps.generate_changelog.outputs.changelog }} |
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,6 +10,7 @@ jobs: | |
unit_test: | ||
name: Run Unit Tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
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