Skip to content

Commit

Permalink
Combine pack and build
Browse files Browse the repository at this point in the history
  • Loading branch information
hallipr committed Jun 5, 2024
1 parent e8bfe47 commit 3dc33d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 20 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Build
run: dotnet build
- name: Pack
run: dotnet pack
--configuration Release
--output "${{github.workspace}}/artifacts/packages"
${{ env.version_suffix_args }}

- name: Test
Expand All @@ -36,13 +37,6 @@ jobs:
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

- name: Pack
run: dotnet pack
--no-build
--configuration Release
--output "${{github.workspace}}/artifacts/packages"
${{ env.version_suffix_args }}

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ jobs:
with:
dotnet-version: '8.x' # SDK Version to use.

- name: Build
run: dotnet build
# Pack the client nuget package and include urls back to the repository and release tag
- name: Pack
run: dotnet pack
--configuration Release
--output "${{github.workspace}}/artifacts/packages"
/p:RepositoryUrl="${{ github.repository }}"
/p:PackageProjectUrl="${{ github.repository }}/tree/${{ github.event.release.tag_name }}"

- name: Test
run: dotnet test
Expand All @@ -29,15 +33,6 @@ jobs:
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

# Pack the client nuget package and include urls back to the repository and release tag
- name: Pack
run: dotnet pack
--no-build
--configuration Release
--output "${{github.workspace}}/artifacts/packages"
/p:RepositoryUrl="${{ github.repository }}"
/p:PackageProjectUrl="${{ github.repository }}/tree/${{ github.event.release.tag_name }}"

# Append the nuget package to the github release that triggered this workflow
- name: Upload release asset
run: gh release upload ${{ github.event.release.tag_name }}
Expand Down

0 comments on commit 3dc33d6

Please sign in to comment.