Auto Upload ZIP to Release #3
Workflow file for this run
This file contains hidden or 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: Auto Upload ZIP to Release | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| attach-zip: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Install GitHub CLI | |
| run: sudo apt install gh -y | |
| - name: Create ZIP file named 'SpaceTheme_for_Steam.zip' | |
| run: | | |
| zip -r SpaceTheme_for_Steam.zip . \ | |
| -x "*.git*" "*.github*" "_assets/*" "README.md" | |
| - name: Upload ZIP to release | |
| env: | |
| GH_TOKEN: ${{ secrets.PERSONAL_TOKEN }} | |
| run: | | |
| TAG_NAME="${{ github.event.release.tag_name }}" | |
| RELEASE_ID=$(gh api repos/${{ github.repository }}/releases/tags/$TAG_NAME --jq '.id') | |
| gh api \ | |
| --method POST \ | |
| -H "Accept: application/vnd.github+json" \ | |
| /repos/${{ github.repository }}/releases/$RELEASE_ID/assets?name=SpaceTheme_for_Steam.zip \ | |
| --input SpaceTheme_for_Steam.zip \ | |
| --header "Content-Type: application/zip" |