Skip to content

Commit 36c0ab6

Browse files
committed
Add nuget publish step
1 parent 69289e1 commit 36c0ab6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,27 @@ jobs:
1414
steps:
1515
- name: Expose GitHub Runtime
1616
uses: crazy-max/ghaction-github-runtime@v3
17+
1718
- name: Add msbuild to PATH
1819
if: runner.os == 'Windows'
1920
uses: microsoft/[email protected]
21+
2022
- name: Install Linux dependencies
2123
if: runner.os == 'Linux'
2224
run: sudo apt-get install build-essential git make cmake autoconf automake pkg-config
2325
shell: bash
26+
2427
- name: Clone repository
2528
uses: actions/checkout@v4
2629
with:
2730
submodules: recursive
31+
2832
- name: Run CAKE
2933
run: dotnet run --project ./build/Build.csproj -- --universalBinary=true
3034
env:
3135
ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }}
3236
ACTIONS_RUNTIME_URL: "${{ env.ACTIONS_RUNTIME_URL }}"
37+
3338
deploy:
3439
name: deploy
3540
runs-on: ubuntu-latest
@@ -41,17 +46,21 @@ jobs:
4146
steps:
4247
- name: Expose GitHub Runtime
4348
uses: crazy-max/ghaction-github-runtime@v3
49+
4450
- name: Clone repository
4551
uses: actions/checkout@v4
4652
with:
4753
submodules: recursive
54+
4855
- name: Run CAKE
4956
run: dotnet run --project ./build/Build.csproj -- --target=Package --universalBinary=true --libraryname=MojoShader --licensepath=mojoshader/LICENSE.txt
5057
env:
5158
ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }}
5259
ACTIONS_RUNTIME_URL: "${{ env.ACTIONS_RUNTIME_URL }}"
5360
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
5462
- name: Make a release
63+
if: github.ref_type == 'tag'
5564
uses: ncipollo/release-action@v1
5665
with:
5766
name: 'MonoGame.Library.MojoShader ${{ github.ref_name }}'
@@ -60,5 +69,8 @@ jobs:
6069
removeArtifacts: true
6170
artifacts: "bin/Release/*.nupkg"
6271
token: ${{ secrets.GITHUB_TOKEN }}
72+
73+
- name: Push package to nuget
6374
if: github.ref_type == 'tag'
75+
run: dotnet nuget push bin/Release/*.nupkg --api-key ${{ secrets.NUGET_DEPLOY_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
6476

0 commit comments

Comments
 (0)