Skip to content

fix: .github/workflows/release_with_tag.yml #13

fix: .github/workflows/release_with_tag.yml

fix: .github/workflows/release_with_tag.yml #13

name: πŸš€πŸ·οΈ Release with Tag
on:
push:
tags:
- '*'
jobs:
## ======================================================================================================
upload_asset_for_windows_cli:
name: πŸͺŸπŸ“¦οΈ Upload Asset - NF.Tool.UnityPackage.Console.exe
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- name: checkout
uses: actions/checkout@v5
# https://github.com/actions/setup-dotnet
- name: setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: publish
run: |
cd src/NF.Tool.UnityPackage.Console
dotnet publish -c Release -p:PublishProfile=Properties/PublishProfiles/FolderProfile.pubxml
- name: πŸ“¦οΈβ« Upload Artifact
uses: actions/upload-artifact@v4
with:
name: artifact-windows-cli
path: src/NF.Tool.UnityPackage.Console/publish/win-x64/NF.Tool.UnityPackage.Console.exe
if-no-files-found: error
retention-days: 1
compression-level: 0
## ======================================================================================================
upload_asset_for_windows_gui:
name: πŸͺŸπŸ“¦οΈ Upload Asset - UnityUnpackGUI.exe
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- name: checkout
uses: actions/checkout@v5
# https://github.com/actions/setup-dotnet
- name: setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: publish
run: |
cd src/UnityPackageGUI_Winform
dotnet publish -c Release -p:PublishProfile=Properties/PublishProfiles/FolderProfile.pubxml
- name: πŸ“¦οΈβ« Upload Artifact
uses: actions/upload-artifact@v4
with:
name: artifact-windows-gui
path: src/UnityPackageGUI_Winform/publish/win-x64/UnityPackageGUI_Winform.exe
if-no-files-found: error
retention-days: 1
compression-level: 0
## ======================================================================================================
upload_asset_for_macos_cli:
name: πŸŽπŸ“¦οΈ Upload Asset - NF.Tool.UnityPackage.Console
runs-on: macos-latest
steps:
# https://github.com/actions/checkout
- name: checkout
uses: actions/checkout@v5
# https://github.com/actions/setup-dotnet
- name: setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: publish
run: |
cd src/NF.Tool.UnityPackage.Console
dotnet publish -c Release -p:PublishProfile=Properties/PublishProfiles/FolderProfile-macos.pubxml
- name: Run Zip
run: |
cd src/NF.Tool.UnityPackage.Console/publish/macos
zip -r macos-cli.zip NF.Tool.UnityPackage.Console
- name: πŸ“¦οΈβ« Upload Artifact
uses: actions/upload-artifact@v4
with:
name: artifact-macos-cli
path: src/NF.Tool.UnityPackage.Console/publish/macos/macos-cli.zip
if-no-files-found: error
retention-days: 1
compression-level: 0
## ======================================================================================================
release:
needs: [upload_asset_for_windows_cli, upload_asset_for_windows_gui, upload_asset_for_macos_cli]
name: πŸš€ Release
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- name: checkout
uses: actions/checkout@v5
with:
sparse-checkout-cone-mode: false
sparse-checkout: |
CHANGELOG.md
- name: Make Directory For Download Artifacts
run: |
mkdir -p download-artifacts
# https://github.com/actions/download-artifact
- name: πŸ“¦οΈβ¬ Download Artifact
uses: actions/download-artifact@v5
with:
path: download-artifacts
- name: Log artifact download
run: |
ls -alh
ls -alh download-artifacts
- name: Get Tagname
id: tag_name
run: |
echo "current_version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
shell: bash
# https://github.com/mindsers/changelog-reader-action
- name: Changelog Reader
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md
# https://github.com/softprops/action-gh-release
- name: πŸš€ Release
uses: softprops/action-gh-release@v2
with:
draft: true
prerelease: false
name: ${{ github.ref_name }}
tag_name: ${{ github.ref }}
body: ${{ steps.changelog_reader.outputs.changes }}
fail_on_unmatched_files: true
files: |
./download-artifacts/artifact-windows-cli/NF.Tool.UnityPackage.Console.exe
./download-artifacts/artifact-windows-gui/UnityPackageGUI_Winform.exe
./download-artifacts/artifact-macos-cli/macos-cli.zip