-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github action to upload pack upon release
- Loading branch information
1 parent
cbe1bad
commit bb7a132
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
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
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 |