Skip to content

Merge pull request #37 from Conspiratio/improvement/naming-rules #37

Merge pull request #37 from Conspiratio/improvement/naming-rules

Merge pull request #37 from Conspiratio/improvement/naming-rules #37

Workflow file for this run

name: Push - Build and publish Lib
on:
push:
branches:
- master
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v1
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Setup NuGet
uses: NuGet/[email protected]
with:
nuget-api-key: ${{secrets.NUGET_API_KEY}}
nuget-version: 'latest'
- name: Restore NuGet Packages
run: nuget restore Conspiratio.Lib.sln
- name: Build
run: msbuild Conspiratio.Lib.sln /p:Configuration=Release
- name: nuget Pack
run: nuget pack Conspiratio.Lib\Conspiratio.Lib.csproj
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: Conspiratio.Lib
path: |
Conspiratio.Lib\bin\Release\*
*.nupkg
- name: Publish the package to nuget.org
run: nuget push *.nupkg ${{secrets.NUGET_API_KEY}} -Source https://api.nuget.org/v3/index.json -SkipDuplicate
- name: Get Version from AssemblyInfo
id: get_version
uses: SirTobyB/[email protected]
with:
AI_PATH: Conspiratio.Lib\Properties\AssemblyInfo.cs # Filepath of the AssemblyInfo, relative to root of repository
- name: Create release text with changelog link
run: |
$version = "${{ steps.get_version.outputs.ASSEMBLY_VERSION }}"
$version = $version.Replace(".","")
$text = "Changelog: https://github.com/Conspiratio/Conspiratio.Lib/blob/master/CHANGELOG.md#"+$version
echo "VERSION_TEXT=${text}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Create GitHub Release
uses: ncipollo/[email protected]
with:
artifacts: 'Conspiratio.Lib\bin\Release\*,*.nupkg'
body: ${{env.VERSION_TEXT}}
token: ${{ secrets.GITHUB_TOKEN }}
commit: master
tag: ${{ steps.get_version.outputs.ASSEMBLY_VERSION }}