Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix release action by saving version in step output #46

Merged
merged 1 commit into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,19 @@ jobs:
- name: Set release version
run: |
TAG=${{ github.event.release.tag_name }}
echo "VERSION=${TAG#v}" >> $GITHUB_ENV

- name: Echo version
run: "echo Version: $VERSION"
echo "VERSION=${TAG#v}" >> $GITHUB_OUTPUT
id: version

- name: Set project version
run: mvn -B versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
run: mvn -B versions:set -DnewVersion=${{ steps.version.outputs.VERSION }} -DgenerateBackupPoms=false

- name: Build and package Maven project
run: mvn clean package

- name: Upload to release
uses: JasonEtco/upload-to-release@master
with:
args: target/CloudnodeMSG-$VERSION.jar application/java-archive
args: target/CloudnodeMSG-${{ steps.version.outputs.VERSION }}.jar application/java-archive
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -57,7 +55,7 @@ jobs:
with:
token: ${{ secrets.MODRINTH_TOKEN }}
project: 5Ce4fxJB
file: target/CloudnodeMSG-$VERSION.jar
file: target/CloudnodeMSG-${{ steps.version.outputs.VERSION }}.jar
changelog: ${{ github.event.release.body }}
loaders: paper

Expand Down
Loading