-
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.
Allow automatic release which increases the version number minor (for now)
- Loading branch information
Showing
1 changed file
with
37 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,37 @@ | ||
name: Perform Release | ||
on: | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: perform_release | ||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | ||
settings-path: ${{ github.workspace }} # location for the settings.xml file | ||
|
||
- name: Get Version Number | ||
id: next_version | ||
run: | | ||
echo "::set-output name=version_number::$(npx semver --increment patch $(curl --silent "https://api.github.com/repos/$GITHUB_REPOSITORY/releases/latest" | jq -r .tag_name))" | ||
- run: echo ${{ steps.next_version.outputs.version_number }} | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.next_version.outputs.version_number }} | ||
|
||
- name: Publish to GitHub Packages | ||
run: ./gradlew publishAllPublicationsToGitHubPackagesRepository | ||
env: | ||
USERNAME: fwilhe2 | ||
TOKEN: ${{ secrets.GPR_AUTH_TOKEN }} | ||
VERSION: ${{ steps.next_version.outputs.version_number }} |