Skip to content

Merge pull request #49 from strvmarv/release-please--branches--main--… #5

Merge pull request #49 from strvmarv/release-please--branches--main--…

Merge pull request #49 from strvmarv/release-please--branches--main--… #5

Workflow file for this run

name: Release
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-22.04
if: github.event_name == 'push'
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
version: ${{ steps.release.outputs.version }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
publish:
needs: release-please
if: |
!cancelled() &&
(needs.release-please.outputs.release_created == 'true' || github.event_name == 'workflow_dispatch')
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- run: dotnet restore
- run: dotnet build ./src/UpdownDotnet.csproj --no-restore -c Release
- run: dotnet test ./test/UpdownDotNetTests/UpdownDotNetTests.csproj --no-restore -c Release --verbosity normal
- run: dotnet pack ./src/UpdownDotnet.csproj -c Release --no-build --output .
- run: dotnet nuget push "*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate