Skip to content

Merge pull request #31 from s2quake/ci/improve-ci #41

Merge pull request #31 from s2quake/ci/improve-ci

Merge pull request #31 from s2quake/ci/improve-ci #41

Workflow file for this run

name: Pack
on:
pull_request:
push:
branches:
- main
tags:
- "*"
jobs:
pack:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
dotnet-version: 8.0.100
- run: echo "${{ secrets.SNK_FILE }}" | base64 --decode > private.snk
- if: ${{ github.event_name == 'pull_request' }}
run: |
.github/scripts/pack-on-pull-request.ps1 `
-OutputPath "pack" `
-PullRequestNumber ${{ github.event.pull_request.number }} `
-KeyPath "$pwd/private.snk"
shell: pwsh
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |
.github/scripts/pack-on-push-main.ps1 `
-OutputPath "pack" `
-KeyPath "$pwd/private.snk" `
-NugetApiKey ${{ secrets.NUGET_API_KEY }}
shell: pwsh
- if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
run: |
$tagName = "${{ github.ref }}" -replace "refs/tags/", ""
.github/scripts/pack-on-push-tag.ps1 `
-OutputPath "pack" `
-KeyPath "$pwd/private.snk" `
-NugetApiKey ${{ secrets.NUGET_API_KEY }}
-TagName $tagName
shell: pwsh