Skip to content

Merge pull request #21 from Nukoooo/7.4 #38

Merge pull request #21 from Nukoooo/7.4

Merge pull request #21 from Nukoooo/7.4 #38

Workflow file for this run

name: Build .NET Framework
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.0.2
- name: Restore NuGet packages and Build .NET Framework
run: msbuild 渔人的直感.sln /restore /p:Configuration=Release
- name: Create temp directory and move files
run: |
mkdir temp_artifact
cp 渔人的直感/bin/Release/渔人的直感.exe temp_artifact/
cp 渔人的直感/Wav/* temp_artifact/
- name: Upload artifacts
if: github.event_name != 'push' || !startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v4 # 更新为 v4
with:
name: FishersIntuition
path: temp_artifact/*
- name: Zip release files
if: startsWith(github.ref, 'refs/tags/v')
run: powershell Compress-Archive -Path temp_artifact/* -DestinationPath FishersIntuition-${{ github.ref_name }}.zip
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
name: "渔人的直感 ${{ github.ref_name }}"
tag_name: ${{ github.ref_name }}
files: FishersIntuition-${{ github.ref_name }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}