Skip to content

Commit 3463575

Browse files
committed
initial
1 parent 90e9664 commit 3463575

14 files changed

+902
-1
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on:
2+
pull_request:
3+
types: [opened, synchronize, reopened]
4+
branches: [ main ]
5+
schedule:
6+
- cron: 0 12 * * 1
7+
8+
env:
9+
DOTNET_NOLOGO: true
10+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
11+
12+
jobs:
13+
build:
14+
name: Build
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v1
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup .NET Core 5.x
23+
uses: actions/setup-dotnet@v1
24+
with:
25+
dotnet-version: 5.0.x
26+
27+
- name: Build
28+
run: dotnet build --configuration Release

.github/workflows/publish.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
on:
2+
push:
3+
tags: [ 'v*' ]
4+
5+
env:
6+
DOTNET_NOLOGO: true
7+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup .NET Core 5.x
20+
uses: actions/setup-dotnet@v1
21+
with:
22+
dotnet-version: 5.0.x
23+
24+
- name: Build and publish
25+
shell: pwsh
26+
run: |
27+
dotnet build --configuration Release
28+
dotnet pack --configuration Release -p:Version=$($env:GITHUB_REF -replace '^refs/tags/v','') --output ./publish
29+
cd ./publish
30+
dotnet nuget push "*.nupkg" -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
31+
dotnet nuget push "*.nupkg" -s https://nuget.pkg.github.com/${{ github.repository_owner }} --skip-duplicate --no-symbols true --api-key ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Create release
34+
uses: actions/create-release@master
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
with:
38+
tag_name: ${{ github.ref }}
39+
release_name: Release ${{ github.ref }}
40+
draft: false
41+
prerelease: false

0 commit comments

Comments
 (0)