forked from danfickle/openhtmltopdf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release mechanism (including groupid transition) (danfickle#20)
* Change groupid to reflect the transition into organization * Doing builds and especially releases both on push and PR leads into duplicate builds. We should choose on of them, and I think PR should suffice * Release process (danfickle#21) * The first commit in the repo is from 2004, so I find it correct to state that as the inception year * Updated the Maven compiler plugin as well * Updated the Maven source and javadocs plugins * Minor tweaks * First take on a release pipeline * Getting there * Switching to using semver instead * Updated groupid to adhere with what Maven central expects and accepts
- Loading branch information
1 parent
7a947ed
commit b968a4a
Showing
15 changed files
with
109 additions
and
41 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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
|
||
name: build | ||
|
||
on: [push, pull_request] | ||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
|
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,65 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java: ['8','11','17', '21'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK ${{matrix.java}} | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: ${{matrix.java}} | ||
cache: maven | ||
- name: Maven -v | ||
run: mvn -v | ||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml | ||
|
||
release: | ||
name: Create release | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- name: Step 1 - Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Step 2 - Import GPG key | ||
run: | | ||
echo "${{ secrets.GPG_PUBLIC_KEY }}" | gpg --import | ||
echo "${{ secrets.GPG_SECRET_KEY }}" | gpg --import --no-tty --batch --yes | ||
- name: Step 3 - Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
cache: maven | ||
server-id: maven | ||
server-username: MAVEN_USERNAME # env variable for username in deploy | ||
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase | ||
- name: Step 4 - Get next version | ||
uses: reecetech/version-increment@2023.9.3 | ||
id: version | ||
with: | ||
scheme: semver | ||
increment: patch | ||
- name: Step 5 - Prepare and perform release | ||
run: mvn -B deploy -Drevision=${{ ${{ steps.version.outputs.version }} | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | ||
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} |
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
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
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
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
Oops, something went wrong.