Commander API Screen v1.0.2 #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: Upload Release Asset | |
| on: | |
| release: | |
| types: [created] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Copy files | |
| run: | | |
| cp LICENSE Commander-API-Screen-BP/ | |
| cp LICENSE Commander-API-Screen-RP/ | |
| cp README.md Commander-API-Screen-BP/ | |
| cp README.md Commander-API-Screen-RP/ | |
| rm LICENSE README.md | |
| - name: Zip the code | |
| run: zip -r source_code.zip . -i Commander-API-Screen-BP/\* Commander-API-Screen-RP/\* | |
| - name: Rename the file | |
| run: | | |
| REPO_NAME=$(echo ${{ github.repository }} | awk -F / '{print $2}') | |
| TAG_NAME=${{ github.event.release.tag_name }} | |
| FILE_NAME=$REPO_NAME-$TAG_NAME.mcaddon | |
| mv source_code.zip $FILE_NAME | |
| echo "FILE_NAME=$FILE_NAME" >> $GITHUB_ENV | |
| - name: Upload Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
| with: | |
| upload_url: ${{ github.event.release.upload_url }} | |
| asset_path: ./${{ env.FILE_NAME }} | |
| asset_name: ${{ env.FILE_NAME }} | |
| asset_content_type: application/octet-stream |