Skip to content

Commit

Permalink
Add release step to publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz authored Jun 8, 2021
1 parent 18231b8 commit 862343b
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,21 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run gradle publish
run: gradle publish -PmineinabyssMavenUsername=${{ secrets.MAVEN_PUBLISH_USERNAME }} -PmineinabyssMavenPassword=${{ secrets.MAVEN_PUBLISH_PASSWORD }}
- name: Run gradle build and publish
run: gradle build publish -PmineinabyssMavenUsername=${{ secrets.MAVEN_PUBLISH_USERNAME }} -PmineinabyssMavenPassword=${{ secrets.MAVEN_PUBLISH_PASSWORD }}

- name: Get version from gradle
shell: bash
id: extract_version
run: |
version=`./gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}'`
echo "::set-output name=version::$version"
- name: Create GitHub Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
automatic_release_tag: v${{ steps.extract_version.outputs.version }}
files: |
build/libs/*-all.jar

0 comments on commit 862343b

Please sign in to comment.