Skip to content

Commit

Permalink
Update release.yml of update'ing paper-plugin.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrykCholewa committed Nov 16, 2024
1 parent 72257e4 commit 009b371
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ jobs:
echo "RELEASE_VERSION=${MAJOR}.${MINOR}.${PATCH}-1.21.3" >> $GITHUB_ENV
echo "NEXT_SNAPSHOT_VERSION=${MAJOR}.${MINOR}.$((PATCH + 1))-1.21.3-SNAPSHOT" >> $GITHUB_ENV
# Update paper-plugin.yml to release version
- name: Update version in paper-plugin.yml for release
run: |
FILE_PATH="${{ github.workspace }}/src/main/resources/paper-plugin.yml"
VERSION="${{ env.RELEASE_VERSION }}"
if [[ -f "$FILE_PATH" ]]; then
yq eval ".version = \"${VERSION}\"" -i "$FILE_PATH"
echo "Updated version in $FILE_PATH to $VERSION"
else
echo "Error: $FILE_PATH not found!"
exit 1
fi
env:
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
shell: bash

# Update pom.xml to release version
- name: Update version in pom.xml for release
Expand All @@ -67,6 +83,23 @@ jobs:
run: |
git tag "v${{ env.RELEASE_VERSION }}"
# Update paper-plugin.yml to next SNAPSHOT version
- name: Update version in paper-plugin.yml for snapshot
run: |
FILE_PATH="${{ github.workspace }}/src/main/resources/paper-plugin.yml"
VERSION="${{ env.NEXT_SNAPSHOT_VERSION }}"
if [[ -f "$FILE_PATH" ]]; then
yq eval ".version = \"${VERSION}\"" -i "$FILE_PATH"
echo "Updated version in $FILE_PATH to $VERSION"
else
echo "Error: $FILE_PATH not found!"
exit 1
fi
env:
NEXT_SNAPSHOT_VERSION: ${{ env.NEXT_SNAPSHOT_VERSION }}
shell: bash

# Update pom.xml to next SNAPSHOT version
- name: Update version in pom.xml to next SNAPSHOT
run: |
Expand Down

0 comments on commit 009b371

Please sign in to comment.