Skip to content

Commit

Permalink
feat(ci): test publish ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ProbablePrime committed Oct 27, 2023
1 parent 251344d commit cdf80f5
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish Library

# When a release is published
on:
release:
types: [published]
jobs:
build:
# 2019, has our .NET needs, latest does not
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
# While this package targets .Net Framework 4.6.2, the dotnet 7 stuff will work.
- name: Get version
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Setup .NET 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore /p:Version=${VERSION}
- name: Pack
run: dotnet pack --output nupkgs --configuration Release /p:Version=${VERSION}
- name: Nuget Publish
run: dotnet nuget push nupkgs/*.nupkg -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json

0 comments on commit cdf80f5

Please sign in to comment.