Skip to content

Commit 12fa2e5

Browse files
committed
updated workflows
1 parent fe95d69 commit 12fa2e5

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

.github/workflows/format.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
name: Format
3+
4+
on:
5+
push:
6+
branches: [ "dev" ]
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Setup .NET
16+
uses: actions/setup-dotnet@v4
17+
with:
18+
dotnet-version: 8.0.x
19+
- name: Restore dependencies
20+
run: dotnet restore
21+
- name: Format
22+
run: dotnet format Style
23+
- name: Commit & Push
24+
run: |
25+
git config --global user.name "github-actions[bot]"
26+
git config --global user.email "github-actions[bot]@user.noreply.github.com"
27+
git commit -a -m"formatted code"
28+
git push

.github/workflows/publish.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
name: .NET
3+
4+
on:
5+
push:
6+
branches: [ "main" ]
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Setup .NET
16+
uses: actions/setup-dotnet@v4
17+
with:
18+
dotnet-version: 8.0.x
19+
- name: Restore dependencies
20+
run: dotnet restore
21+
- name: Build
22+
run: dotnet build --no-restore
23+
- name: Pack
24+
run: dotnet pack --no-build -c Release -o ${{github.workspace}}/Packages
25+
- name: Upload Artifact
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: nupkg
29+
path: ${{github.workspace}}/Packages/*.nupkg
30+
- name: Download Artifact
31+
uses: actions/download-artifact@v4
32+
with:
33+
name: nupkg
34+
path: ${{github.workspace}}/Packages/*.nupkg
35+
36+
- name: Push To Nuget
37+
run: dotnet nuget push "${{github.workspace}}/Packages/*.nupkg" -k ${{secrets.NUGET_API_KEY_SPANEXTENSIONS}} -s https://api.nuget.org/v3/index.json --skip-duplicate

0 commit comments

Comments
 (0)