Skip to content

Commit c7784ff

Browse files
committed
hopefully fix publish workflow
1 parent 7c5296a commit c7784ff

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414

1515
steps:
16+
- name: Set tag version
17+
id: get_version
18+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
19+
shell: bash
20+
1621
- uses: actions/checkout@v3
1722

1823
- name: Setup .NET Core
@@ -23,18 +28,22 @@ jobs:
2328
- name: Restore tools
2429
run: dotnet tool restore
2530

26-
- name: Publish to NuGet
27-
run: dotnet run --project build -- -t Push
28-
env:
29-
nuget-key: ${{ secrets.NUGET_KEY }}
31+
- name: Pack the library
32+
run: dotnet pack -c Release -o release
3033

3134
- name: Get Changelog Entry
3235
id: changelog_reader
33-
uses: mindsers/changelog-reader-action@v1.1.0
36+
uses: mindsers/changelog-reader-action@v2
3437
with:
35-
version: ${{ github.ref }}
38+
version: ${{ steps.get_version.outputs.VERSION }}
3639
path: ./CHANGELOG.md
3740

41+
- name: Push the package to NuGet
42+
run: dotnet nuget push release/Ionide.LanguageServerProtocol.${{ steps.get_version.outputs.VERSION }}.nupkg --source "$env:NUGET_SOURCE" --api-key "$env:NUGET_KEY"
43+
env:
44+
NUGET_KEY: ${{ secrets.NUGET_KEY }}
45+
NUGET_SOURCE: "https://api.nuget.org/v3/index.json"
46+
3847
- name: Create Release
3948
uses: actions/create-release@latest
4049
env:

0 commit comments

Comments
 (0)