Skip to content

Commit

Permalink
Update CI workflow for new branch names
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad committed Oct 4, 2023
1 parent b099b82 commit 443db74
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,25 @@ name: ci
on:
push:
branches:
- master
- release
- dev
- main
tags:
- v*
paths-ignore:
- LICENSE
- '**.md'
pull_request:
branches:
- master
- dev
- main
paths-ignore:
- LICENSE
- '**.md'

jobs:
build:

name: "Build & package"
runs-on: ubuntu-latest

env:
Expand All @@ -39,11 +47,24 @@ jobs:
- name: Publish package artifact
uses: actions/upload-artifact@v2-preview
with:
name: package
name: FormFlow.nupkg
path: src/FormFlow/bin/Release/*.nupkg



release:

name: "Release"
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')

steps:
- name: Download package artifact
uses: actions/download-artifact@v2
with:
name: FormFlow.nupkg

- name: Publish package to NuGet
if: startsWith(github.ref, 'refs/tags/v')
run: dotnet nuget push src/FormFlow/bin/Release/*.nupkg --api-key ${NUGET_TOKEN} --source https://api.nuget.org/v3/index.json
run: dotnet nuget push **/*.nupkg --api-key $NUGET_TOKEN --source https://api.nuget.org/v3/index.json --skip-duplicate
env:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}

0 comments on commit 443db74

Please sign in to comment.