Skip to content

Commit a773357

Browse files
Merge pull request #83 from SparkViewEngine/release-action
Release github action
2 parents 2e2f732 + 73a9452 commit a773357

File tree

4 files changed

+48
-4
lines changed

4 files changed

+48
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,4 @@ jobs:
3232
run: |
3333
cd src
3434
dotnet test --no-build --verbosity normal spark-ci.slnf
35-
- name: Pack
36-
run: |
37-
cd src
38-
dotnet pack spark-pack.slnf
35+

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: Release to NuGet
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: windows-2019
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: 8.0.x
21+
- name: Restore dependencies
22+
run: |
23+
cd src
24+
dotnet restore spark-ci.slnf
25+
- name: Build
26+
run: |
27+
cd src
28+
dotnet build --no-restore spark-ci.slnf
29+
- name: Test
30+
run: |
31+
cd src
32+
dotnet test --no-build --verbosity normal spark-ci.slnf
33+
- name: Pack
34+
run: |
35+
cd src
36+
dotnet pack spark-pack.slnf
37+
- name: Push to NuGet
38+
run: |
39+
cd src
40+
dotnet nuget push "*.nupkg" --api-key ${{secrets.nuget_api_key}} --source https://api.nuget.org/v3/index.json
41+

src/Spark.AspNetCore.Mvc/Spark.AspNetCore.Mvc.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
<PropertyGroup>
33
<SignAssembly>False</SignAssembly>
44
<AssemblyOriginatorKeyFile>..\SparkKey.snk</AssemblyOriginatorKeyFile>
5+
<IsPackable>True</IsPackable>
6+
<AssemblyVersion>1.8.2.0</AssemblyVersion>
7+
<Version>1.8.2.0-alpha</Version>
8+
<FileVersion>1.8.2.0-alpha</FileVersion>
9+
<Authors>RobertTheGrey</Authors>
510
<Company>Louis DeJardin</Company>
611
<PackageProjectUrl>https://github.com/SparkViewEngine/</PackageProjectUrl>
712
<PackageReadmeFile>README.md</PackageReadmeFile>

src/Spark.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1212
ProjectSection(SolutionItems) = preProject
1313
..\.github\workflows\ci.yml = ..\.github\workflows\ci.yml
1414
Directory.Build.props = Directory.Build.props
15+
..\.github\workflows\release.yml = ..\.github\workflows\release.yml
1516
Settings.StyleCop = Settings.StyleCop
1617
..\spark.build = ..\spark.build
1718
EndProjectSection

0 commit comments

Comments
 (0)