Skip to content

Merge pull request #19 from erenken/work/dotnetupgrade #31

Merge pull request #19 from erenken/work/dotnetupgrade

Merge pull request #19 from erenken/work/dotnetupgrade #31

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.x'
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.7
with:
useConfigFile: true
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: |
dotnet build ./src/myNOC.WeatherLink/myNOC.WeatherLink.csproj --configuration Release --no-restore /p:Version="${{ steps.gitversion.outputs.assemblySemVer }}" /p:AssemblyVersion="${{ steps.gitversion.outputs.assemblySemVer }}" /p:FileVersion="${{ steps.gitversion.outputs.assemblySemFileVer }}" /p:InformationalVersion="${{ steps.gitversion.outputs.informationalVersion }}" /p:PackageVersion="${{ steps.gitversion.outputs.nuGetVersion }}" /p:ContinuousIntegrationBuild=true
- name: Pack nuget
run: |
dotnet pack ./src/myNOC.WeatherLink/myNOC.WeatherLink.csproj --configuration Release --no-build --no-restore --include-symbols --output ./.pack --verbosity normal -p:PackageVersion="${{ steps.gitversion.outputs.nuGetVersion }}"
- name: Nuget Push
run: |
dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_PUBLISH }} --skip-duplicate
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.gitversion.outputs.nuGetVersion }}
release_name: v${{ steps.gitversion.outputs.nuGetVersion }}
draft: false
prerelease: true