Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
suhas-cashfree authored Jan 24, 2024
1 parent c894b15 commit dd80705
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:

- name: Checkout repository
uses: actions/checkout@v1

- name: Get Latest Tag
uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag

- name: Setup .NET Core @ Latest
uses: actions/setup-dotnet@v1
Expand All @@ -31,3 +35,20 @@ jobs:
- name: Push generated package to Nuget registry
run: dotnet nuget push ./src/cashfree_pg/out/*.nupkg --api-key ${{secrets.NUGET_TOKEN}} --skip-duplicate --no-symbols

- name: Release tags
run: |
curl --location --request POST 'https://api.github.com/repos/cashfree/cashfree-pg-sdk-dotnet/releases' \
--header 'Accept: application/vnd.github+json' \
--header "Authorization: Bearer ${{ secrets.TOKEN_GITHUB }}" \
--header 'X-GitHub-Api-Version: 2022-11-28' \
--header 'Content-Type: application/json' \
--data-raw '{
"tag_name": "${{ steps.get-latest-tag.outputs.tag }}",
"target_commitish": "main",
"name": "${{ steps.get-latest-tag.outputs.tag }}",
"body": "Release version ${{ steps.get-latest-tag.outputs.tag }}",
"draft": false,
"prerelease": false,
"generate_release_notes": false
}'

0 comments on commit dd80705

Please sign in to comment.