generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
debugging release.yml to publish JARs
- Loading branch information
Showing
5 changed files
with
136 additions
and
63 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 |
---|---|---|
|
@@ -89,8 +89,7 @@ jobs: | |
name: Release JARs | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout code | ||
|
@@ -104,19 +103,20 @@ jobs: | |
with: | ||
java-version: "11" | ||
distribution: "temurin" | ||
- name: Publish JARs | ||
server-id: 'ossrh' # must match the serverId configured for the nexus-staging-maven-plugin | ||
server-username: OSSRH_USERNAME | ||
server-password: OSSRH_PASSWORD | ||
gpg-passphrase: SIGN_KEY_PASS | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
cache: 'maven' | ||
- name: Publish JARs # release JARs to central | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
mvn release:clean release:prepare release:perform \ | ||
--batch-mode \ | ||
-DreleaseVersion=$(git describe --tags --abbrev=0 | cut -c2-) \ | ||
-Dtag=$(git describe --tags --abbrev=0) \ | ||
-Dsonatype.username=${{ secrets.SONATYPE_USERNAME }} \ | ||
-Dsonatype.password=${{ secrets.SONATYPE_PASSWORD }} \ | ||
-Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} \ | ||
-DserverId=ossrh | ||
mvn --batch-mode versions:set -DnewVersion=$(git describe --tags --abbrev=0 | cut -c2-) -DprocessAllModules -DgenerateBackupPoms=false | ||
mvn -U --batch-mode clean deploy -P release | ||
env: | ||
SIGN_KEY_PASS: ${{ secrets.GPG_PASSPHRASE }} | ||
OSSRH_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
GITHUB_TOKEN: ${{ github.token }} | ||
create-release: | ||
name: Release Go Binaries | ||
|
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,39 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
name: Publish Snapshots | ||
jobs: | ||
release-jars: | ||
name: Release JARs | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Init Hermit | ||
uses: cashapp/activate-hermit@v1 | ||
# Ideally we'd use Hermit's JDK, but this action creates the correct settings.xml for us. | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: "11" | ||
distribution: "temurin" | ||
server-id: 'ossrh' # must match the serverId configured for the nexus-staging-maven-plugin | ||
server-username: OSSRH_USERNAME | ||
server-password: OSSRH_PASSWORD | ||
gpg-passphrase: SIGN_KEY_PASS | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
cache: 'maven' | ||
- name: Publish Snapshot JARs | ||
run: | | ||
mvn --batch-mode versions:set -DnewVersion=$(git describe --tags --abbrev=0 | cut -c2-)-SNAPSHOT -DprocessAllModules -DgenerateBackupPoms=false | ||
mvn -U --batch-mode clean deploy -P snapshot | ||
env: | ||
SIGN_KEY_PASS: ${{ secrets.GPG_PASSPHRASE }} | ||
OSSRH_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
GITHUB_TOKEN: ${{ github.token }} |
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
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