Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release github action #83

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading