Skip to content

Commit

Permalink
- combine build and publish jobs (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuyen-vuduc authored Dec 12, 2022
1 parent cd51973 commit 05f6863
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
# pull_request:
# branches: [ main, master ]
jobs:
build:
build-then-publish:
environment: production
runs-on: macos-latest
steps:
Expand All @@ -30,18 +30,10 @@ jobs:
run: |
sh build.sh --target=nuget --base-path=$PWD
publish:
runs-on: macos-latest
env:
NUGET_PUSH_API_KEY: ${{ secrets.NUGET_PUSH_API_KEY }}
steps:
- name: Setup .NET Core SDK 6.0.403
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.403'
- name: Publish with Dotnet CLI
shell: bash
run: |
dotnet nuget push nugets/*.nupkg --api-key $NUGET_PUSH_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push nugets/*.nupkg --api-key "$NUGET_PUSH_API_KEY" --source https://api.nuget.org/v3/index.json --skip-duplicate
# publish:
# runs-on: macos-latest
Expand Down
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
echo $PWD

dotnet run --project ./frosting/Build.csproj -- "$@"

ls ~/nugets

0 comments on commit 05f6863

Please sign in to comment.