Skip to content

Commit

Permalink
Add github action to upload pack upon release
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottKillen committed Jun 12, 2022
1 parent cbe1bad commit bb7a132
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/packsquash.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Optimize resource pack
on:
release:
types: [published]
jobs:
packsquash:
name: Optimize resource pack
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # A non-shallow repository clone is required
- name: Run PackSquash
uses: ComunidadAylas/PackSquash-action@v3
with:
path: source
- name: Download optimized pack
uses: actions/download-artifact@v3
with:
name: Optimized pack
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./pack.zip
asset_name: ${{ github.event.repository.name }}-1.16.X-${{ github.event.release.tag_name }}.zip
asset_content_type: application/zip

0 comments on commit bb7a132

Please sign in to comment.