add release drafter #11
Workflow file for this run
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: Release Drafter | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, reopened, synchronize] | |
permissions: | |
contents: read | |
jobs: | |
create_draft_release: | |
permissions: | |
contents: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate release title | |
id: gen_release_title | |
run: | | |
TITLE=$(date "+%Y-%m-%d")_BuildID-${GITHUB_RUN_NUMBER} | |
echo ::set-output name=version::${TITLE} | |
echo "Version set to ${TITLE}" | |
- name: Create release draft | |
uses: release-drafter/release-drafter@v5 | |
id: create_draft | |
with: | |
tag: ${{ steps.gen_release_title.outputs.title }} | |
name: ${{ steps.gen_release_title.outputs.title }} | |
version: ${{ steps.gen_release_title.outputs.title }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
upload_asset: | |
needs: create_draft_release | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
# - name: Set up .NET Core | |
# uses: actions/setup-dotnet@v7 | |
# with: | |
# dotnet-version: '3.1' | |
# - name: Build C# application | |
# run: dotnet build -c Release | |
# - name: Archive application | |
# run: zip -r app.zip path/to/your/application | |
- name: Archive UnrealEngine plugin | |
run: Compress-Archive -Path "Plugins/UnrealEngine" -DestinationPath "UnrealEngine.zip" | |
- name: Archive Unity plugin | |
run: Compress-Archive -Path "Plugins/Unity" -DestinationPath "Unity.zip" | |
- name: Archive Godot plugin | |
run: Compress-Archive -Path "Plugins/Godot" -DestinationPath "Godot.zip" | |
- name: Upload UnrealEngine plugin | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_draft.outputs.upload_url }} | |
asset_path: ./UnrealEngine.zip | |
asset_name: UnrealEngine.zip | |
asset_content_type: application/zip | |
- name: Upload Unity plugin | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_draft.outputs.upload_url }} | |
asset_path: ./Unity.zip | |
asset_name: Unity.zip | |
asset_content_type: application/zip | |
- name: Upload Godot plugin | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_draft.outputs.upload_url }} | |
asset_path: ./Godot.zip | |
asset_name: Godot.zip | |
asset_content_type: application/zip |