Skip to content

Commit 96b3ecf

Browse files
authored
Fix release action by saving version in step output (#46)
2 parents 30ab82a + d145be7 commit 96b3ecf

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,19 @@ jobs:
3434
- name: Set release version
3535
run: |
3636
TAG=${{ github.event.release.tag_name }}
37-
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
38-
39-
- name: Echo version
40-
run: "echo Version: $VERSION"
37+
echo "VERSION=${TAG#v}" >> $GITHUB_OUTPUT
38+
id: version
4139

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

4543
- name: Build and package Maven project
4644
run: mvn clean package
4745

4846
- name: Upload to release
4947
uses: JasonEtco/upload-to-release@master
5048
with:
51-
args: target/CloudnodeMSG-$VERSION.jar application/java-archive
49+
args: target/CloudnodeMSG-${{ steps.version.outputs.VERSION }}.jar application/java-archive
5250
env:
5351
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5452

@@ -57,7 +55,7 @@ jobs:
5755
with:
5856
token: ${{ secrets.MODRINTH_TOKEN }}
5957
project: 5Ce4fxJB
60-
file: target/CloudnodeMSG-$VERSION.jar
58+
file: target/CloudnodeMSG-${{ steps.version.outputs.VERSION }}.jar
6159
changelog: ${{ github.event.release.body }}
6260
loaders: paper
6361

0 commit comments

Comments
 (0)