Skip to content

Commit

Permalink
Cleanup release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronpowell committed Nov 11, 2024
1 parent 549cf9c commit 5dbbc4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 27 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ env:
6.0.x
9.0.x
GITHUB_SOURCE: "https://nuget.pkg.github.com/aaronpowell/index.json"
CONFIGURATION: "Debug"

on:
push:
Expand Down
34 changes: 8 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
runs-on: ubuntu-latest
environment:
name: CI
env:
DOTNET_CONFIGURATION: Release
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -27,11 +29,12 @@ jobs:
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Restore dotnet tools
run: dotnet tool restore

- name: Generate packages
run: dotnet fake run ./build.fsx --target Release
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration ${{ env.DOTNET_CONFIGURATION }}
- name: Publish NuGet package
run: dotnet pack --no-build -c ${{ env.DOTNET_CONFIGURATION }} -o ${{ env.OUTPUT_PATH }} -p:VersionSuffix='alpha.${{ github.run_number }}'

- name: Publish release packages
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -79,27 +82,6 @@ jobs:
asset_name: DotNetDelice.Licensing.${{ env.tag }}.nupkg
asset_content_type: application/zip

- name: Upload NuGet symbol package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ env.OUTPUT_PATH }}/dotnet-delice.${{ env.tag }}.snupkg
asset_name: dotnet-delice.${{ env.tag }}.snupkg
asset_content_type: application/zip

- name: Upload NuGet symbol package (Licensing)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ env.OUTPUT_PATH }}/DotNetDelice.Licensing.${{ env.tag }}.snupkg
asset_name: DotNetDelice.Licensing.${{ env.tag }}.snupkg
asset_content_type: application/zip


publish-release:
needs: build
runs-on: ubuntu-latest
Expand Down

0 comments on commit 5dbbc4a

Please sign in to comment.