Skip to content

Commit

Permalink
Run build & test on non-default branches
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-nef committed Apr 25, 2024
1 parent be0b9d5 commit 20e7621
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: gocardless/gocardless-dotnet/build_and_publish
on:
push:
branches:
- master
name: build_and_publish
on: push

env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}

jobs:
build_and_test:
runs-on: ubuntu-latest
Expand All @@ -26,6 +25,7 @@ jobs:
- uses: actions/upload-artifact@v3.1.1
with:
path: "GoCardless/bin/Release/*.nupkg"

publish:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
Expand All @@ -42,4 +42,3 @@ jobs:
include-prerelease: true
- name: Publish the library
run: dotnet nuget push artifact/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} -n --skip-duplicate

0 comments on commit 20e7621

Please sign in to comment.