Update README.md #8
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: Resourcepack Zipper | |
on: | |
push: | |
branches: | |
- main # Adjust this branch name if needed | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # A non-shallow repository clone is required | |
- name: Run PackSquash | |
uses: ComunidadAylas/PackSquash-action@v4 | |
with: | |
packsquash_version: latest # Uses the latest PackSquash release supported by the action | |
shader_source_transformation_strategy: keep_as_is | |
- name: Create ZIP file | |
run: | | |
COMMIT_ID=$(git rev-parse --short HEAD) | |
ZIP_NAME="Abstract.zip" | |
echo "ZIP_NAME=${ZIP_NAME}" >> $GITHUB_ENV | |
zip -r "${ZIP_NAME}" . | |
- name: Upload ZIP artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: resource-pack-artifact | |
path: ${{ env.ZIP_NAME }} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RESOURCE_ZIPPER }} | |
with: | |
tag_name: release-${{ github.sha }} | |
release_name: Release ${{ github.sha }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Artifact | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RESOURCE_ZIPPER }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ github.workspace }}/${{ env.ZIP_NAME }} | |
asset_name: ${{ env.ZIP_NAME }} | |
asset_content_type: application/zip |