Skip to content

Commit

Permalink
Download pom.xml in github-release step instead of generating again
Browse files Browse the repository at this point in the history
  • Loading branch information
fhoeben committed Apr 1, 2022
1 parent 9dfe021 commit cf4788f
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
jobs:
maven-release:
runs-on: ubuntu-18.04
outputs:
version: ${{ steps.get-version.outputs.version }}
steps:
- name: Check out Git repository
uses: actions/checkout@v2
Expand All @@ -21,6 +23,18 @@ jobs:
- name: Unsnapshot version
run: mvn versions:set -DremoveSnapshot

- id: get-version
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "::set-output name=version::$VERSION"
- name: upload release pom
uses: actions/upload-artifact@v3
with:
name: pom
path: pom.xml
if-no-files-found: error

- name: Release Maven package
uses: samuelmeuli/action-maven-publish@v1
with:
Expand All @@ -43,26 +57,17 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Install Java and Maven
uses: actions/setup-java@v2
- name: download pom
uses: actions/download-artifact@v3
with:
java-version: '8'
distribution: 'zulu'
name: pom

- name: download packages
uses: actions/download-artifact@v3
with:
name: target
path: target

- name: Unsnapshot version
run: mvn versions:set -DremoveSnapshot

- id: get-version
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "::set-output name=version::$VERSION"
- name: Create changelog text
id: changelog
uses: loopwerk/tag-changelog@v1
Expand All @@ -85,7 +90,7 @@ jobs:
id: createRelease
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.get-version.outputs.version }}
tag_name: ${{ needs.maven-release.outputs.version }}
body: ${{ steps.changelog.outputs.changes }}
draft: false
prerelease: false
Expand Down

0 comments on commit cf4788f

Please sign in to comment.