Skip to content

Commit

Permalink
feat(ci): publish changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ProbablePrime committed Dec 15, 2023
1 parent e677e1c commit dbc5d88
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,27 @@ on:

jobs:
build:
runs-on: windows-latest
runs-on: windows-2019
env:
VERSION: ${{ github.event.release.tag_name }}
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core
- uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.1
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Build with dotnet
run: dotnet build OggVorbisEncoder --configuration Release -p:Version=${{ env.VERSION }}
- name: Pack nuget Package
run: dotnet pack OggVorbisEncoder --configuration Release -p:Version=${{ env.VERSION }} --output nupkgs
- name: Push package to nuget
run: dotnet nuget push nupkgs\*.nupkg -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json
dotnet-version: '5.0.x'
- name: Setup NuGet
uses: NuGet/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NUGET_TOKEN }}
- name: Restore Nuget
run: nuget restore CSCore.sln
- name: Build Solution
run: |
msbuild.exe CSCore.sln /p:Platform="Any CPU" /p:Configuration=Release
- name: Pack
run: nuget pack ./CSCore/CSCore.csproj -OutputDirectory nupkgs -Build -Version ${{ env.VERSION }} -Properties version="${{ env.VERSION }}"
- name: Nuget Publish
run: nuget push nupkgs\*.nupkg -ApiKey ${{ secrets.NUGET_TOKEN }} -Source https://api.nuget.org/v3/index.json
7 changes: 7 additions & 0 deletions CSCore/CSCore.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<!-- NUGET META DATA -->
<PropertyGroup>
<PackageId>YellowDogMan.CSCore</PackageId>
<RepositoryUrl>https://github.com/Yellow-Dog-Man/cscore</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageProjectURL>https://github.com/Yellow-Dog-Man/cscore</PackageProjectURL>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand Down

0 comments on commit dbc5d88

Please sign in to comment.