-
Notifications
You must be signed in to change notification settings - Fork 14
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 #72 from avioconsulting/feature/github-action
Added Github Action
- Loading branch information
Showing
7 changed files
with
147 additions
and
11 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 @@ | ||
exclude-labels: | ||
- 'skip-changelog' | ||
categories: | ||
- title: '🚀 Features' | ||
labels: | ||
- 'feature' | ||
- 'enhancement' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- title: '🧰 Maintenance' | ||
label: 'chore' | ||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||
template: | | ||
## Changes | ||
$CHANGES |
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,82 @@ | ||
name: Java CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'feature/**' | ||
pull_request: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: 'recursive' | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Set Version | ||
id: set-version | ||
run: "./gradlew properties -q | grep version: | awk '{print \"::set-output name=version::\" $2}'" | ||
|
||
- name: Print Version | ||
run: echo "Version ${{ steps.set-version.outputs.version }}" | ||
|
||
- name: Compile | ||
run: ./gradlew assemble | ||
|
||
- name: Verify | ||
run: ./gradlew check | ||
|
||
- name: Publish Unit Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v1 | ||
if: always() | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
files: ./build/test-results/test/*.xml | ||
|
||
- name: Publish Artifact | ||
if: github.event_name != 'pull_request' | ||
env: | ||
MVN_USER: ${{ secrets.GIT_USER }} | ||
MVN_PASSWORD: ${{ secrets.GIT_TOKEN }} | ||
run: | | ||
echo "$MVN_USER" | ||
echo "$MVN_PASSWORD" | ||
./gradlew publish | ||
- name: Perform Release | ||
if: ${{ !contains(steps.set-version.outputs.version, 'SNAPSHOT') && github.event_name != 'pull_request' }} | ||
run: echo "Releasing version ${{ steps.set-version.outputs.version }}" | ||
|
||
- name: Perform Release | ||
if: ${{ !contains(steps.set-version.outputs.version, 'SNAPSHOT') && github.event_name != 'pull_request' }} | ||
env: | ||
GIT_USER: ${{ secrets.GIT_USER }} | ||
GIT_PASSWORD: ${{ secrets.GIT_TOKEN }} | ||
run: | | ||
git config --local credential.helper "!f() { echo username=\\GIT_USER; echo password=\\$GIT_PASSWORD; }; f" | ||
git config --global user.email "${{ secrets.GIT_EMAIL }}" | ||
git config --global user.name "${{ secrets.GIT_USER }}" | ||
git tag -a v${{ steps.set-version.outputs.version }} -m "Version ${{ steps.set-version.outputs.version }}" | ||
./gradlew incrementPatch -Dversion.prerelease=SNAPSHOT | ||
git add version.properties | ||
git commit -m "Incrementing to next SNAPSHOT patch version" | ||
git push --follow-tags | ||
- name: Add Release Note and Create Github Release | ||
if: ${{ !contains(steps.set-version.outputs.version, 'SNAPSHOT') && github.event_name != 'pull_request' }} | ||
uses: release-drafter/release-drafter@v5 | ||
with: | ||
version: ${{ steps.set-version.outputs.version }} | ||
tag: v${{ steps.set-version.outputs.version }} | ||
publish: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version.buildmeta= | ||
version.major=1 | ||
version.minor=0 | ||
version.patch=0 | ||
version.prerelease=SNAPSHOT | ||
version.semver=1.0.0-SNAPSHOT |