Skip to content

Commit

Permalink
chore: publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lpcouto committed Jan 24, 2024
1 parent 2e1fd8e commit ec45900
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ name: Build
on:
pull_request:

#push:
# branches:
# - main
# - release-*
push:
branches: [ main ]

jobs:
build:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish

on:
release:
types: [ published ]

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '2.0.x'

- name: Pack
run: dotnet pack ./LoadShedding.sln -c Release /p:Version=${{ github.event.release.tag_name }} -o ./drop

- name: Publish
run: dotnet nuget push ./drop/**/*.nupkg -k ${{ secrets.NUGET_PUBLISH_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate

- name: Print Version
run: echo ${{ github.event.release.tag_name }}

0 comments on commit ec45900

Please sign in to comment.