Skip to content

Commit

Permalink
add newtonsoft to release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd committed Dec 5, 2023
1 parent cef9dfe commit 672c358
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: dotnet build -c Release --no-restore

- name: Test
run: dotnet test --no-build -c Release /p:CollectCoverage=true /p:Threshold=80 /p:Include=\"[Flurl]*,[Flurl.Http]*\" /p:Exclude="[*]*.GeneratedExtensions"
run: dotnet test --no-build -c Release /p:CollectCoverage=true /p:Threshold=80 /p:Include=\"[Flurl]*,[Flurl.Http]*,[Flurl.Http.Newtonsoft]*\" /p:Exclude="[*]*.GeneratedExtensions"

# Compare version from csproj with latest release tag.
# If different, create a draft release.
Expand Down Expand Up @@ -57,12 +57,28 @@ jobs:
releases-only: true
regex: '^Flurl\.Http\.\d+'

- name: Get Flurl.Http.Newtonsoft csproj version
id: csproj_ver_flurl_newtonsoft
uses: KageKirin/[email protected]
with:
file: src/Flurl.Http.Newtonsoft/Flurl.Http.Newtonsoft.csproj

- name: Get Flurl.Http.Newtonsoft latest release tag
id: release_ver_flurl_newtonsoft
uses: oprypin/[email protected]
with:
repository: tmenier/Flurl
releases-only: true
regex: '^Flurl\.Http\.Newtonsoft\.\d+'

- name: Output versions
run: |
echo "Flurl csproj version: ${{ steps.csproj_ver_flurl.outputs.version }}"
echo "Flurl latest release tag: ${{ steps.release_ver_flurl.outputs.tag }}"
echo "Flurl.Http csproj version: ${{ steps.csproj_ver_flurl_http.outputs.version }}"
echo "Flurl.Http latest release tag: ${{ steps.release_ver_flurl_http.outputs.tag }}"
echo "Flurl.Http.Newtonsoft csproj version: ${{ steps.csproj_ver_flurl_newtonsoft.outputs.version }}"
echo "Flurl.Http.Newtonsoft latest release tag: ${{ steps.release_ver_flurl_newtonsoft.outputs.tag }}"
- name: Draft Flurl release
env:
Expand Down Expand Up @@ -91,3 +107,17 @@ jobs:
generateReleaseNotes: true
artifacts: "**/${{ env.NEXT_TAG }}.nupkg,**/${{ env.NEXT_TAG }}.snupkg"
draft: true

- name: Draft Flurl.Http.Newtonsoft release
env:
CURRENT_TAG: ${{ steps.release_ver_flurl_newtonsoft.outputs.tag }}
NEXT_TAG: "Flurl.Http.${{ steps.csproj_ver_flurl_newtonsoft.outputs.version }}"
RELEASE_NAME: "Flurl.Http ${{ steps.csproj_ver_flurl_newtonsoft.outputs.version }}"
if: env.NEXT_TAG != env.CURRENT_TAG
uses: ncipollo/release-action@v1
with:
name: ${{ env.RELEASE_NAME }}
tag: ${{ env.NEXT_TAG }}
generateReleaseNotes: true
artifacts: "**/${{ env.NEXT_TAG }}.nupkg,**/${{ env.NEXT_TAG }}.snupkg"
draft: true

0 comments on commit 672c358

Please sign in to comment.