Steam publish condition fixed #47
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: BuildNugetPackage | |
on: | |
push: | |
branches: [ "master", "main" ] | |
# pull_request: | |
# branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Restore tools | |
run: dotnet tool restore | |
- name: Get version | |
run: dotnet tool run ezpipeline git-height-version -- -b 0.0.1 -v VERSION | |
- name: Make nuget folder | |
run: mkdir ./nuget | |
- name: Build Thrird Person Package | |
working-directory: ./thirdperson | |
run: dotnet pack ./RbfxTemplate.csproj -o ../nuget/ -p:PackageVersion=${{ env.VERSION }} | |
- name: Build Casual Package | |
working-directory: ./casual | |
run: dotnet pack ./RbfxTemplate.csproj -o ../nuget/ -p:PackageVersion=${{ env.VERSION }} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
# if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
./nuget/*.nupkg | |
name: v${{ env.VERSION }} | |
tag_name: v${{ env.VERSION }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish to nuget.org | |
working-directory: ./nuget | |
run: dotnet nuget push *.${{ env.VERSION }}.nupkg --api-key ${{ secrets.RBFXTEMPLATETHIRDPERSON }} --source https://api.nuget.org/v3/index.json |