Skip to content

Commit

Permalink
Create GitHub Action.
Browse files Browse the repository at this point in the history
  • Loading branch information
MouriNaruto committed Feb 12, 2024
1 parent a8283c2 commit c2d155e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish

on: [push]

jobs:
build:
runs-on: windows-latest
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: microsoft/setup-msbuild@v2
- name: Clear local NuGet cache (workaround for failed restores on windows-latest)
run: dotnet nuget locals all --clear
- name: Build
run: msbuild BuildAllTargets.proj
- name: Publish to NuGet
if: contains(github.ref, 'tags/')
working-directory: ${{env.GITHUB_WORKSPACE}}
shell: cmd
run: |
:: 把生成的nuget包发布到nuget中
nuget push Output\MINT.nupkg -ApiKey ${{ secrets.NUGET_TOKEN }} -Source https://api.nuget.org/v3/index.json

0 comments on commit c2d155e

Please sign in to comment.