-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
70 additions
and
0 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,70 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
|
||
jobs: | ||
release: | ||
name: Create release | ||
runs-on: macos-latest | ||
permissions: write-all | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
steps: | ||
- name: Extract version name | ||
id: extract_name | ||
run: echo "name=$(echo ${GITHUB_REF##*/})" >>$GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: Checkout to push branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
fetch-depth: 0 | ||
|
||
- name: Generate changelog | ||
id: changelog | ||
uses: metcalfc/[email protected] | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create release | ||
id: create_release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
name: Release ${{ steps.extract_name.outputs.name }} | ||
body: ${{ steps.changelog.outputs.changelog }} | ||
|
||
publish: | ||
name: Build desktop release | ||
permissions: write-all | ||
runs-on: macos-latest | ||
needs: release | ||
steps: | ||
- name: Checkout to push branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
fetch-depth: 0 | ||
|
||
- name: Extract version from tag | ||
uses: damienaicheh/[email protected] | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: 'corretto' | ||
|
||
- name: Publish to MavenCentral | ||
run: ./gradlew publishAllPublicationsToSonatypeRepository | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} |