Updated to balance pass #334
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: CI/CD | |
| on: [push, pull_request, workflow_dispatch] | |
| jobs: | |
| job: | |
| permissions: write-all | |
| name: CI/CD | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.nuget/packages | |
| key: nuget-${{ hashFiles('**/*.csproj') }} | |
| - name: Build | |
| run: dotnet build -warnaserror | |
| - name: Build nuget | |
| if: github.event_name == 'workflow_dispatch' | |
| run: dotnet pack PolyMod.csproj -o nuget | |
| - name: Deploy nuget | |
| if: github.event_name == 'workflow_dispatch' | |
| run: dotnet nuget push -s https://polymod.dev/nuget/v3/index.json -k ${{ secrets.KEY }} nuget/*.nupkg | |
| - name: Get version | |
| if: github.event_name == 'workflow_dispatch' | |
| id: version | |
| uses: kzrnm/get-net-sdk-project-versions-action@v2 | |
| with: | |
| proj-path: PolyMod.csproj | |
| - name: Deploy release | |
| if: github.event_name == 'workflow_dispatch' | |
| run: | | |
| if [[ "${{ steps.version.outputs.version }}" == *"-"* ]]; then | |
| gh release create v${{ steps.version.outputs.version }} bin/IL2CPP/net6.0/PolyMod.dll -p -t v${{ steps.version.outputs.version }} | |
| else | |
| gh release create v${{ steps.version.outputs.version }} bin/IL2CPP/net6.0/PolyMod.dll -t v${{ steps.version.outputs.version }} | |
| fi | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |