Skip to content

Commit 6646df8

Browse files
authored
Create main.yml
1 parent 47948e9 commit 6646df8

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release Package
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
pack:
10+
environment: nuget
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: NuGet/setup-nuget@v1.0.5
15+
with:
16+
nuget-api-key: ${{ secrets.NUGETAPIKEY }}
17+
- name: Nuget Push
18+
run: |
19+
Version=${GITHUB_REF:10}
20+
sed -i "s/\(<MongoAnalyzerRuleSetVersion>\)[^<]*\(<\/MongoAnalyzerRuleSetVersion>\)/\1$version\2/" $solution/src/Cnblogs.Architecture.Ddd.Cqrs.MongoDb.Analyzer/build/Cnblogs.Architecture.Ddd.Cqrs.MongoDb.Analyzer.props
21+
dotnet pack Cnblogs.Architecture.sln -p:Version="$Version" -c Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --include-source -o "output"
22+
nuget push output/*.* -NonInteractive -Source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)