fix build by specifying explicit which project to restore packages for #4
Workflow file for this run
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
# 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: .NET | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore lib.remnant2.analyzer.csproj | |
- name: Set Version Variable | |
if: ${{ github.ref_type == 'tag' }} | |
env: | |
TAG: ${{ github.ref_name }} | |
run: echo "VERSION=${TAG#v}" >> $GITHUB_ENV | |
- name: Build | |
run: dotnet build lib.remnant2.analyzer.csproj -c Release --no-restore /p:Version=$VERSION | |
#- name: Pack | |
# run: dotnet pack | |
- name: Push | |
if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v') | |
run: dotnet nuget push bin/Release/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json |