-
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.
- Loading branch information
1 parent
964f1c3
commit f52f4eb
Showing
4 changed files
with
111 additions
and
4 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,20 @@ | ||
name: preview | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- labeled | ||
|
||
jobs: | ||
release: | ||
name: Preview release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- id: bumpr | ||
if: "!startsWith(github.ref, 'refs/tags/')" | ||
name: Bump versions | ||
uses: haya14busa/action-bumpr@v1 |
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: release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
# we have to use an administrator's personal access token to be able to push to a protected branch | ||
# https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches | ||
token: ${{ secrets.PAT }} | ||
|
||
- id: bumpr-check | ||
if: "!startsWith(github.ref, 'refs/tags/')" | ||
name: Check for version bump | ||
uses: haya14busa/action-bumpr@v1 | ||
with: | ||
dry_run: true | ||
|
||
- if: "!steps.bumpr-check.outputs.skip" | ||
name: Bump version | ||
run: | | ||
VERSION=${{ steps.bumpr-check.outputs.next_version }} | ||
VERSION=${VERSION#v} make bump | ||
- if: "!steps.bumpr-check.outputs.skip" | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "Bump version to ${{ steps.bumpr-check.outputs.next_version }}" | ||
|
||
- id: bumpr | ||
if: "!startsWith(github.ref, 'refs/tags/')" | ||
name: Perform version bump | ||
uses: haya14busa/action-bumpr@v1 | ||
|
||
- if: "!steps.bumpr.outputs.skip" | ||
name: Update tags | ||
uses: haya14busa/action-update-semver@v1 | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
tag: ${{ steps.bumpr.outputs.next_version }} | ||
|
||
- if: "!steps.bumpr.outputs.skip" | ||
env: | ||
MVN_CENTRAL_USERNAME: ${{ secrets.MVN_CENTRAL_USERNAME }} | ||
MVN_CENTRAL_PASSWORD: ${{ secrets.MVN_CENTRAL_PASSWORD }} | ||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
name: Publish to Maven Central | ||
run: make publish | ||
|
||
- if: "!steps.bumpr.outputs.skip" | ||
name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
generate_release_notes: true | ||
tag_name: ${{ steps.bumpr.outputs.next_version }} |
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,22 @@ | ||
name: test | ||
|
||
on: | ||
pull_request | ||
|
||
jobs: | ||
test: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build | ||
run: make build | ||
|
||
- name: Run tests | ||
run: make test |
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