diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9388537..4873983 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,23 +8,13 @@ on: required: false default: true type: boolean - github: - description: Create GitHub release - required: false - default: true - type: boolean - push: - description: Push changes - required: false - default: true - type: boolean permissions: contents: write jobs: release: - name: Maven and GitHub Release + name: Maven Release runs-on: ubuntu-latest steps: @@ -44,23 +34,9 @@ jobs: gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Remove SNAPSHOT from version - run: mvn --batch-mode versions:set -DremoveSnapshot versions:commit - - - name: Set RELEASE_VERSION environment variable run: | - echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV - - - name: Update CHANGELOG.md - uses: thomaseizinger/keep-a-changelog-new-release@v3 - with: - tag: ${{ env.RELEASE_VERSION }} - - - name: Query release info - id: query-release-info - uses: release-flow/keep-a-changelog-action@v3 - with: - command: query - version: latest + mvn --batch-mode versions:set -DremoveSnapshot versions:commit + find . -name "pom.xml" -exec sed -i "" 's#.0000-SNAPSHOT#.0000#g' {} + - name: Deploy package if: ${{ inputs.central }} @@ -68,32 +44,4 @@ jobs: env: MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }} MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - - - name: Commit and push release - if: ${{ inputs.push }} - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: "Create release ${{ steps.query-release-info.outputs.version }}" - tagging_message: ${{ steps.query-release-info.outputs.version }} - - - name: Create release - if: ${{ inputs.github }} - uses: softprops/action-gh-release@v2 - with: - name: ${{ steps.update-query-release-info.outputs.version }} - tag_name: ${{ steps.query-release-info.outputs.version }} - body: ${{ steps.query-release-info.outputs.release-notes }} - - - name: Next SNAPSHOT version - run: mvn --batch-mode versions:set -DnextSnapshot versions:commit - - - name: Set RELEASE_VERSION env variable - run: | - echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV - - - name: Commit and push development version - if: ${{ inputs.push }} - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "Bump development version to ${{ env.RELEASE_VERSION }}" \ No newline at end of file + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} \ No newline at end of file