Update main.yml #829
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 Archive | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Archive Release | |
uses: thedoctor0/zip-release@master | |
with: | |
filename: 'dev.zip' | |
exclusions: '*.git* README.md *.schema* *.zip *.py run/*' | |
- name: Delete dev files | |
run: rm assets/minecraft/textures/particle/effect_* | |
- name: Archive Release | |
uses: thedoctor0/zip-release@master | |
with: | |
filename: 'patreon.zip' | |
exclusions: '*.git* README.md *.schema* *.zip *.py run/*' | |
- name: Run script | |
run: python .github/scripts/process_input.py | |
- name: Archive Release | |
uses: thedoctor0/zip-release@master | |
with: | |
filename: '20.zip' | |
exclusions: '*.git* README.md *.schema* *.zip *.py run/*' | |
- name: Reset specific files or directories | |
run: | | |
git checkout -- assets/ | |
rm assets/minecraft/textures/particle/effect_* | |
rm -R assets/minecraft/textures/item/custom/noted | |
rm -R assets/ms/models/noted | |
sed -i 's/ms:noted\/[a-zA-Z_0-9]*\b/ms:wooden_shovel\/note/g' assets/minecraft/models/item/carrot.json | |
- name: Archive Release | |
uses: thedoctor0/zip-release@master | |
with: | |
filename: 'patreon_low.zip' | |
exclusions: '*.git* README.md *.schema* *.zip *.py run/*' | |
- name: Run script | |
run: python .github/scripts/process_input.py | |
- name: Archive Release | |
uses: thedoctor0/zip-release@master | |
with: | |
filename: '20_low.zip' | |
exclusions: '*.git* README.md *.schema* *.zip *.py run/*' | |
- name: Delete | |
uses: ame-yu/action-delete-latest-release@v2 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Calculate SHA1 Hashes | |
run: | | |
for file in resourcepack.zip resourcepack_low.zip resourcepack_20.zip resourcepack_20_low.zip; do | |
sha1sum $file > $file.sha1 | |
done | |
- name: Upload Resourcepack Release with SHA1 | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: 'resourcepack.zip,resourcepack_low.zip,resourcepack_20.zip,resourcepack_20_low.zip,resourcepack.zip.sha1,resourcepack_low.zip.sha1,resourcepack_20.zip.sha1,resourcepack_20_low.zip.sha1' | |
tag: 'resourcepack-${{ github.sha }}' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Patreon Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: 'patreon.zip,patreon_low.zip,dev.zip,20.zip,20_low.zip,run/noted.txt' | |
tag: 'patreon' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update pack on server | |
run: curl -X GET "${{ secrets.UPDATE_URL }}" |