Skip to content

Improve GitHub Actions workflow (#103) #4

Improve GitHub Actions workflow (#103)

Improve GitHub Actions workflow (#103) #4

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: release
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: windows-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Install Eticat
run: dotnet tool install -g EtiCat
- name: CI
run: EtiCat ci
- name: Publish the package
run: if (Test-path Build/*.nupkg) { dotnet nuget push Build/*.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }} }
shell: pwsh