Formatting #49
This file contains 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 Nightly" | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish_nightly: | |
runs-on: ubuntu-latest | |
if: "!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[ci-skip]') && !contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[nuget-skip]')" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- name: "Setup .NET" | |
uses: "actions/setup-dotnet@v2" | |
with: | |
dotnet-version: | | |
7.0.x | |
8.0.x | |
- name: Build | |
run: dotnet build -c Release | |
- name: Test | |
run: dotnet test --no-build -c Release | |
- name: "Build Nightly Nuget Packages" | |
run: | | |
mkdir build | |
dotnet pack -p:SymbolPackageFormat=snupkg --include-symbols --include-source -p:VersionSuffix='nightly-0${{ github.run_number }}' -p:BuildNumber=0$(( ${{ github.run_number }} )) -c Release -o build | |
- name: "Publish Nightly Nuget Packages" | |
run: "dotnet nuget push \"build/*\" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json" # If the package version does not comply with SemVer, it will be set as a pre-release version automatically. |