Skip to content

Commit 97b2a50

Browse files
authored
Replace release action with GH CLI (#17)
1 parent 1004e99 commit 97b2a50

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

.github/workflows/ci-cd.yml

+15-8
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ jobs:
117117
needs: ci
118118
runs-on: ubuntu-latest
119119
steps:
120+
- name: Checkout repository
121+
id: checkout_repo
122+
uses: actions/checkout@v2
123+
with:
124+
token: ${{ secrets.GITHUB_TOKEN }}
125+
fetch-depth: 0
126+
120127
# - name: Download and extract NuGet packages
121128
# id: dl_packages_artifact
122129
# uses: actions/download-artifact@v2
@@ -139,14 +146,14 @@ jobs:
139146

140147
- name: Create and publish release
141148
id: create_release
142-
uses: softprops/action-gh-release@v1
143-
with:
144-
name: OpenApi v${{ needs.ci.outputs.latest_version }}
145-
tag_name: v${{ needs.ci.outputs.latest_version }}
146-
# files: |
147-
# NuGet/Microsoft.OpenApi.${{ needs.ci.outputs.latest_version }}.nupkg
148-
# NuGet/Microsoft.OpenApi.Readers.${{ needs.ci.outputs.latest_version }}.nupkg
149+
shell: pwsh
150+
run: |
151+
$releaseTag = "v${{ needs.ci.outputs.latest_version }}"
152+
$releaseTitle = "OpenApi v${{ needs.ci.outputs.latest_version }}"
153+
# $releaseAssets = 'NuGet/Microsoft.OpenApi.${{ needs.ci.outputs.latest_version }}.nupkg', 'NuGet/Microsoft.OpenApi.Readers.${{ needs.ci.outputs.latest_version }}.nupkg'
154+
155+
gh release create $releaseTag -t $releaseTitle $releaseAssets
149156
env:
150-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
151158

152159
# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation)

0 commit comments

Comments
 (0)