Skip to content

Commander API Screen v1.0.2 #3

Commander API Screen v1.0.2

Commander API Screen v1.0.2 #3

Workflow file for this run

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