-
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.
Merge pull request #4 from protegeproject/update-workflows
Update workflows for auto-release
- Loading branch information
Showing
3 changed files
with
57 additions
and
33 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,17 +1,22 @@ | ||
name: Java CI | ||
name: Verify | ||
|
||
on: [push] | ||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
distribution: 'adopt' | ||
- name: Build with Maven | ||
run: mvn --batch-mode --update-snapshots package | ||
run: mvn --batch-mode verify |
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,48 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor != 'protegeproject-bot[bot]' }} | ||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ vars.PROTEGEPROJECT_BOT_APP_ID }} | ||
private-key: ${{ secrets.PROTEGEPROJECT_BOT_APP_PRIVATE_KEY }} | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ steps.app-token.outputs.token }} | ||
ref: ${{ github.head_ref }} | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
server-id: ossrh | ||
server-username: OSSRH_USERNAME | ||
server-password: OSSRH_TOKEN | ||
gpg-private-key: ${{secrets.GPG_PRIVATE_KEY}} | ||
gpg-passphrase: GPG_PASSPHRASE | ||
- name: Bump version | ||
id: bump | ||
uses: mickem/gh-action-bump-maven-version@v1 | ||
- name: Build with Maven | ||
run: mvn --batch-mode -Prelease deploy | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.bump.outputs.tag }} | ||
generate_release_notes: true | ||
|
||
env: | ||
GPG_PASSPHRASE: ${{secrets.GPG_PASSPHRASE}} | ||
OSSRH_USERNAME: ${{secrets.OSSRH_USERNAME}} | ||
OSSRH_TOKEN: ${{secrets.OSSRH_TOKEN}} |