Removed version command option since Spectre.Console.Cli provides thi… #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build -c Release | |
- name: Pack | |
run: dotnet pack -c Release src/NuPU/NuPU.csproj /p:Version=1.0.${{ github.run_number }} | |
- name: Install dotnet-validate | |
run: dotnet tool install --global dotnet-validate --version 0.0.1-preview.304 | |
- name: Validate Elmah.Io.AspNetCore | |
run: dotnet-validate package local src/NuPU/nupkg/NuPU.1.0.${{ github.run_number }}.nupkg | |
- name: Push to nuget.org | |
run: dotnet nuget push src/NuPU/nupkg/NuPU.1.0.${{ github.run_number }}.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | |
if: ${{ github.event_name == 'push' }} | |
- name: Create the Release | |
if: ${{ github.event_name == 'push' }} | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: 1.0.${{ github.run_number }} | |
release_name: Release 1.0.${{ github.run_number }} | |
draft: false |