Skip to content

Commit

Permalink
Improve build system
Browse files Browse the repository at this point in the history
  • Loading branch information
viceroypenguin committed Nov 14, 2024
1 parent 5a8b103 commit 0c9e591
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: [viceroypenguin]
7 changes: 0 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,3 @@ jobs:
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Package
run: dotnet pack -c Release --no-build -o nupkgs
if: startsWith(github.ref, 'refs/tags/')
- name: Push to Nuget
run: dotnet nuget push "./nupkgs/*.nupkg" --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGETPUBLISHKEY }}
if: startsWith(github.ref, 'refs/tags/')
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
workflow_dispatch:
push:
tags:
- '**'

permissions:
contents: write

jobs:
release:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore

- name: Package
run: dotnet pack -c Release --no-build --property:PackageOutputPath=../../nupkgs
- name: Push to Nuget
run: dotnet nuget push "./nupkgs/*.nupkg" --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGETPUBLISHKEY }}

- name: Create Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: 'true'
makeLatest: 'true'
1 change: 0 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<TargetFramework>net8.0</TargetFramework>

<Nullable>enable</Nullable>
<WarningsAsErrors>$(WarningsAsErrors);nullable;</WarningsAsErrors>
Expand Down

0 comments on commit 0c9e591

Please sign in to comment.