Skip to content

Commit

Permalink
Revert "fix: remove release published workflow as it is redundant"
Browse files Browse the repository at this point in the history
This reverts commit 2606464.
  • Loading branch information
asser-dk committed Jul 12, 2024
1 parent 0f35d05 commit 9f51d6c
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release-published.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: On release published

on:
release:
types: [ published ]

jobs:
build_release_nuget_package:
name: Build and push NuGet package
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build --verbosity minimal

- name: Pack Fenris.OneOfContrib.Blazor
run: |
VERSION=${{ github.event.release.tag_name }}
VERSION=${VERSION#v}
dotnet pack src/Fenris.OneOfContrib.Blazor/ -c Release -o ./artifacts --verbosity minimal -p:PackageVersion=$VERSION
- name: Push implementation package
run: |
dotnet nuget push ./artifacts/*.nupkg \
--source "https://api.nuget.org/v3/index.json" \
--api-key ${{ secrets.NUGET_TOKEN }}
- name: Push symbols package
run: |
dotnet nuget push ./artifacts/*.snupkg \
--source "https://www.nuget.org/api/v2/symbolpackage" \
--api-key ${{ secrets.NUGET_TOKEN }}

0 comments on commit 9f51d6c

Please sign in to comment.