Skip to content

Fix version

Fix version #49

Workflow file for this run

name: Build and package
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
job: [package-template, test-template]
steps:
- uses: actions/checkout@v3
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
- name: Build and Package Template
if: matrix.job == 'package-template'
run: |
dotnet pack
- name: Publish to NuGet
if: matrix.job == 'package-template' && contains(github.ref, 'refs/tags/v')
run: dotnet nuget push ./bin/Release/*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json
- name: Test Template Install and Build
if: matrix.job == 'test-template'
run: |
# Install the template locally
dotnet new --install templates/basic
# Create a new project from the template
mkdir testapp
cd testapp
dotnet new tui -n myproj
cd myproj
# Build the generated project
dotnet build