EDNA/.github/workflows/create-release.yaml

46 lines
1 KiB
YAML
Raw Permalink Normal View History

2022-05-30 21:16:53 +02:00
name: Create release on tag push
on:
push:
tags:
- 'release/*'
jobs:
build:
name: Build EDNA
runs-on: windows-latest
2022-05-30 21:16:53 +02:00
permissions:
contents: write
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup .Net
uses: actions/setup-dotnet@v2
2022-05-30 21:16:53 +02:00
with:
2024-02-18 23:28:26 +01:00
dotnet-version: '7.0.x'
2022-05-30 21:16:53 +02:00
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c release
- name: Run tests
run: dotnet test
- name: Create NuGet package
run: dotnet pack -c release
- name: Push NuGet package
2022-07-11 17:04:04 +02:00
run: dotnet nuget push "Edna\bin\Release\alterNERDtive.EDNA.*.nupkg" --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_AUTH_TOKEN}}
2022-05-30 21:16:53 +02:00
- name: Draft release
uses: ncipollo/release-action@v1
with:
artifacts: "Edna/bin/Release/alterNERDtive.EDNA.*.nupkg"
bodyFile: "CHANGELOG.md"
draft: true
2022-07-13 21:14:11 +02:00
token: ${{ secrets.RELEASE_TOKEN }}