Merge pull request #21 from metaone01/develop #9
This file contains hidden or 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: Publish to GitHub Packages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 检出代码 | |
| - uses: actions/checkout@v5 | |
| # 设置 .NET 环境 | |
| - name: Setup .NET Core | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 9.0.x | |
| # 恢复依赖项 | |
| - name: Restore dependencies | |
| run: dotnet restore ./src/RelativeControl.Avalonia/RelativeControl.Avalonia.csproj | |
| # 构建项目 | |
| - name: Build project | |
| run: dotnet build ./src/RelativeControl.Avalonia/RelativeControl.Avalonia.csproj --configuration Release | |
| # 发布到 GitHub Packages | |
| - name: Publish Packages to GitHub Packages | |
| run: dotnet nuget push "./src/RelativeControl.Avalonia/bin/Release/*.nupkg" --source https://nuget.pkg.github.com/metaone01/index.json --api-key ${{ secrets.PACKAGE_API_KEY }} --skip-duplicate | |
| - name: Publish Package Symbols to GitHub Packages | |
| run: dotnet nuget push "./src/RelativeControl.Avalonia/bin/Release/*.snupkg" --source https://nuget.pkg.github.com/metaone01/index.json --api-key ${{ secrets.PACKAGE_API_KEY }} --skip-duplicate | |