Skip to content

Commit

Permalink
Release github action
Browse files Browse the repository at this point in the history
- Added package info to Spark.AspNetCore.Mvc.csproj
  • Loading branch information
bounav committed Dec 16, 2024
1 parent d7b703e commit 73a9452
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,4 @@ jobs:
run: |
cd src
dotnet test --no-build --verbosity normal spark-ci.slnf
- name: Pack
run: |
cd src
dotnet pack spark-pack.slnf
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Release to NuGet

on:
release:
types: [published]

jobs:
build:

runs-on: windows-2019

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: |
cd src
dotnet restore spark-ci.slnf
- name: Build
run: |
cd src
dotnet build --no-restore spark-ci.slnf
- name: Test
run: |
cd src
dotnet test --no-build --verbosity normal spark-ci.slnf
- name: Pack
run: |
cd src
dotnet pack spark-pack.slnf
- name: Push to NuGet
run: |
cd src
dotnet nuget push "*.nupkg" --api-key ${{secrets.nuget_api_key}} --source https://api.nuget.org/v3/index.json
5 changes: 5 additions & 0 deletions src/Spark.AspNetCore.Mvc/Spark.AspNetCore.Mvc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
<PropertyGroup>
<SignAssembly>False</SignAssembly>
<AssemblyOriginatorKeyFile>..\SparkKey.snk</AssemblyOriginatorKeyFile>
<IsPackable>True</IsPackable>
<AssemblyVersion>1.8.2.0</AssemblyVersion>
<Version>1.8.2.0-alpha</Version>
<FileVersion>1.8.2.0-alpha</FileVersion>
<Authors>RobertTheGrey</Authors>
<Company>Louis DeJardin</Company>
<PackageProjectUrl>https://github.com/SparkViewEngine/</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down
1 change: 1 addition & 0 deletions src/Spark.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
..\.github\workflows\ci.yml = ..\.github\workflows\ci.yml
Directory.Build.props = Directory.Build.props
..\.github\workflows\release.yml = ..\.github\workflows\release.yml
Settings.StyleCop = Settings.StyleCop
..\spark.build = ..\spark.build
EndProjectSection
Expand Down

0 comments on commit 73a9452

Please sign in to comment.