Add mummy music file (#2) #191
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: Push Pack | |
on: | |
push: | |
branches: | |
- "*" | |
jobs: | |
lint: | |
name: Lint Code Base | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
# See https://github.com/actions/checkout/releases | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: Lint Code Base | |
run: find . -type f \( -iname \*.json -o -iname \*.mcmeta \) -print0 | while IFS= read -r -d '' line; do echo Validating ${line} && jq empty ${line} || exit 1; done && echo All JSON files are valid | |
build: | |
name: Compress and Send Pack | |
needs: [lint] | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Minify JSON | |
run: find . -type f \( -iname \*.json -o -iname \*.mcmeta \) -print0 | while IFS= read -r -d '' line; do jq -c 'del(.credit, .groups)' ${line} > ${line}.tmp && mv ${line}.tmp ${line}; done | |
- name: Install pngquant | |
run: sudo apt-get install -y pngquant libpng-dev | |
- name: Minify images | |
continue-on-error: true | |
run: find . -type f -name '*.png' -exec pngquant --strip -f --ext .png {} \; 2>/dev/null | |
- name: Compress pack | |
run: zip -8 -r -X ParadisuResourcePack.zip * | |
- name: Create Release | |
# See https://github.com/Kas-tle/base-release-action/releases | |
uses: Kas-tle/base-release-action@b863fa0f89bd15267a96a72efb84aec25f168d4c # main-11 | |
if: ${{ success() && github.repository == 'Paradisu/ParadisuResourcePack' }} | |
id: release | |
with: | |
files: | | |
ParadisuResourcePack.zip | |
appID: ${{ secrets.RELEASE_APP_ID }} | |
appPrivateKey: ${{ secrets.RELEASE_APP_PK }} | |
preRelease: ${{ github.ref_name != 'master' }} | |
discordWebhook: ${{ secrets.DISCORD_WEBHOOK }} | |
- name: Setup NodeJS | |
# See https://github.com/actions/setup-node/releases | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
if: ${{ success() && github.repository == 'Paradisu/ParadisuResourcePack' && github.ref_name == 'master' }} | |
- name: Publish Pack to Server | |
if: ${{ success() && github.repository == 'Paradisu/ParadisuResourcePack' && github.ref_name == 'master' }} | |
env: | |
PTEROPUB_CONFIG: ${{ secrets.PTEROPUB_CONFIG }} | |
run: npx pteropub | |
upload-logs: | |
name: Upload Logs | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Upload Logs | |
# See https://github.com/Kas-tle/release-build-log-action/releases | |
if: ${{ success() && github.repository == 'Paradisu/ParadisuPlugin' }} | |
uses: Kas-tle/release-build-log-action@1b57448eaf9476e6e05450e4ea240449eac2c0d2 # main-3 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
releaseID: ${{ needs.build.outputs.release_id }} |