Publish NuGet Packages #3
Workflow file for this run
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 NuGet Packages | |
| on: | |
| workflow_dispatch: | |
| env: | |
| DOTNET_VERSION: '8.0.x' | |
| DOTNET_NOLOGO: true | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Build and pack in dependency order | |
| run: | | |
| chmod +x .github/scripts/build-and-pack-nuget.sh | |
| .github/scripts/build-and-pack-nuget.sh | |
| - name: Push packages to NuGet | |
| run: | | |
| chmod +x .github/scripts/push-nuget-packages.sh | |
| .github/scripts/push-nuget-packages.sh | |
| env: | |
| NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
| - name: Set release date | |
| run: | | |
| echo "RELEASE_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV | |
| echo "RELEASE_TAG=v$(date +%Y.%-m.%-d)" >> $GITHUB_ENV | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2.3.2 | |
| with: | |
| name: War3Net Release ${{ env.RELEASE_DATE }} | |
| tag_name: ${{ env.RELEASE_TAG }} | |
| files: | | |
| ./artifacts/Packages.zip | |
| draft: true |