Update building_version.json #98
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Builds | |
on: | |
push: | |
paths: | |
- 'datapacks/Skyblock CE datapacks/data/skyblock/function/versions/changelog/building_version.json' | |
jobs: | |
check_changes: | |
runs-on: ubuntu-24.04 | |
outputs: | |
release_changed: ${{ steps.check.outputs.release_changed }} | |
nightly_changed: ${{ steps.check.outputs.nightly_changed }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Check changes | |
id: check | |
shell: bash | |
run: | | |
FILE="datapacks/Skyblock CE datapacks/data/skyblock/function/versions/changelog/building_version.json" | |
OLD_RELEASE=$(git show HEAD^:"$FILE" | grep "Release Building" || echo "") | |
NEW_RELEASE=$(git show HEAD:"$FILE" | grep "Release Building" || echo "") | |
OLD_NIGHTLY=$(git show HEAD^:"$FILE" | grep "Nightly Building" || echo "") | |
NEW_NIGHTLY=$(git show HEAD:"$FILE" | grep "Nightly Building" || echo "") | |
if [ "$OLD_RELEASE" != "$NEW_RELEASE" ]; then | |
echo "release_changed=true" >> "$GITHUB_OUTPUT" | |
else | |
echo "release_changed=false" >> "$GITHUB_OUTPUT" | |
fi | |
if [ "$OLD_NIGHTLY" != "$NEW_NIGHTLY" ]; then | |
echo "nightly_changed=true" >> "$GITHUB_OUTPUT" | |
else | |
echo "nightly_changed=false" >> "$GITHUB_OUTPUT" | |
fi | |
release_build: | |
needs: check_changes | |
if: needs.check_changes.outputs.release_changed == 'true' | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Upload release content | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Skyblock_CE_Latest | |
path: | | |
. | |
!.git/ | |
!.github/ | |
!.gitignore | |
!Resources Pack/ | |
!crowdin.yml | |
!spyglass.json | |
!*.zip | |
!.DS_Store | |
if-no-files-found: error | |
retention-days: 90 | |
nightly_build: | |
needs: check_changes | |
if: needs.check_changes.outputs.nightly_changed == 'true' | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Upload nightly content | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Skyblock_CE_Nightly_Snapshots | |
path: | | |
. | |
!.git/ | |
!.github/ | |
!.gitignore | |
!Resources Pack/ | |
!crowdin.yml | |
!spyglass.json | |
!*.zip | |
!.DS_Store | |
if-no-files-found: error | |
retention-days: 90 |