-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgraded Gradle wrapper and lib-guillotine dependency
- Loading branch information
1 parent
0781f38
commit 7ec04ea
Showing
3 changed files
with
94 additions
and
3 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 |
---|---|---|
|
@@ -7,6 +7,8 @@ jobs: | |
|
||
runs-on: ubuntu-latest | ||
|
||
needs: release_notes | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
|
@@ -23,4 +25,93 @@ jobs: | |
- run: ./gradlew build | ||
|
||
- uses: codecov/[email protected] | ||
- uses: codecov/[email protected] | ||
|
||
### PUBLISHING STEPS ### | ||
|
||
- name: Get publishing variables | ||
id: publish_vars | ||
uses: enonic/release-tools/publish-vars@master | ||
env: | ||
PROPERTIES_PATH: './gradle.properties' | ||
JAVA_HOME: '' | ||
|
||
- name: Fail on bad config | ||
if: steps.publish_vars.outputs.version == '' || steps.publish_vars.outputs.projectName == '' | ||
run: exit 1 | ||
|
||
- name: Publish | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
run: ./gradlew publish -PrepoKey=${{ steps.publish_vars.outputs.repo }} -PrepoUser=${{ secrets.ARTIFACTORY_USERNAME }} -PrepoPassword=${{ secrets.ARTIFACTORY_PASSWORD }} | ||
|
||
- name: Download changelog | ||
if: steps.publish_vars.outputs.release == 'true' | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: changelog | ||
|
||
- name: Create Release | ||
if: steps.publish_vars.outputs.release == 'true' | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.publish_vars.outputs.tag_name }} | ||
body_path: changelog.md | ||
prerelease: ${{ steps.publish_vars.outputs.prerelease == 'true' }} | ||
|
||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
if: "steps.create_release.outputs.upload_url != ''" | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: "build/libs/${{ steps.publish_vars.outputs.projectName }}-${{ steps.publish_vars.outputs.version }}.jar" | ||
asset_name: "${{ steps.publish_vars.outputs.projectName }}-${{ steps.publish_vars.outputs.version }}.jar" | ||
asset_content_type: application/java-archive | ||
|
||
- name: Write new snapshot version | ||
if: steps.publish_vars.outputs.release == 'true' | ||
uses: christian-draeger/[email protected] | ||
with: | ||
path: './gradle.properties' | ||
property: 'version' | ||
value: ${{ steps.publish_vars.outputs.nextSnapshot }} | ||
|
||
- name: Commit and push new version | ||
if: steps.publish_vars.outputs.release == 'true' | ||
uses: EndBug/add-and-commit@v4 | ||
with: | ||
add: ./gradle.properties | ||
message: 'Updated to next SNAPSHOT version' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
release_notes: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get previous release tag | ||
id: get_previous_release_tag | ||
run: | | ||
PREVIOUS_RELEASE_TAG=$(git tag --sort=-version:refname --merged | grep -E '^v([[:digit:]]+\.){2}[[:digit:]]+$' | head -1) | ||
echo ::set-output name=previous_release_tag::$PREVIOUS_RELEASE_TAG | ||
- name: Generate Release Notes | ||
uses: enonic/release-tools/generate-changelog@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ZENHUB_TOKEN: ${{ secrets.ZENHUB_TOKEN }} | ||
PREVIOS_RELEASE_TAG: ${{ steps.get_previous_release_tag.outputs.previous_release_tag }} | ||
OUTPUT_FILE: changelog.md | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: changelog | ||
path: changelog.md |
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