Skip to content

Commit 537585d

Browse files
committed
chore(sharppipeactions)#: Split build and release actions
1 parent 5e204cd commit 537585d

File tree

2 files changed

+43
-8
lines changed

2 files changed

+43
-8
lines changed

.github/workflows/build.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test Build Library
1+
name: Build Library
22
run-name: ${{ github.actor }} is building SharpPipe
33

44
on:
@@ -7,11 +7,7 @@ on:
77
- '**/*.md'
88
branches:
99
- main
10-
pull_request:
11-
branches:
12-
- main
13-
paths-ignore:
14-
- '**/*.md'
10+
1511

1612
jobs:
1713
build:
@@ -29,7 +25,13 @@ jobs:
2925
Invoke-WebRequest https://github.com/Yellow-Dog-Man/soundpipe/releases/latest/download/SoundPipe-Windows-Linux.zip -OutFile .\SoundPipe-Windows-Linux.zip
3026
Expand-Archive .\SoundPipe-Windows-Linux.zip -DestinationPath .\SharpPipe
3127
32-
3328
- name: Build
3429
working-directory: ./SharpPipe
35-
run: dotnet pack -c Release
30+
run: dotnet pack -c Release
31+
32+
- name: Put a big red bow on it
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: SharpPipe
36+
path: SharpPipe/bin/Release/*.nupkg
37+

.github/workflows/release.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish Library
2+
run-name: ${{ github.actor }} is publishing SharpPipe
3+
4+
on:
5+
release:
6+
types: [published]
7+
8+
9+
jobs:
10+
publish:
11+
env:
12+
VERSION: ${{ github.event.release.tag_name }}
13+
14+
runs-on: windows-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v3
20+
with:
21+
dotnet-version: 8.0.x
22+
23+
- name: Download soundpipe native library
24+
run: |
25+
Invoke-WebRequest https://github.com/Yellow-Dog-Man/soundpipe/releases/latest/download/SoundPipe-Windows-Linux.zip -OutFile .\SoundPipe-Windows-Linux.zip
26+
Expand-Archive .\SoundPipe-Windows-Linux.zip -DestinationPath .\SharpPipe
27+
28+
- name: Build
29+
working-directory: ./SharpPipe
30+
run: dotnet pack -c Release -p:Version=${{ env.VERSION }} -p:PackageVersion=${{ env.VERSION }}
31+
32+
- name: Nuget Publish
33+
run: dotnet nuget push .\LiteNetLib\bin\Release\*.nupkg -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)