Update dotnet.yml #27
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: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Install dependencies | |
uses: nuget/setup-nuget@v2 | |
with: | |
nuget-version: ${{ matrix.nuget }} | |
- run: nuget restore FriishProduce.sln | |
- name: Build and publish release | |
run: | | |
cd FriishProduce | |
dotnet build --configuration Release --no-restore | |
dotnet publish -c Release -o ../_build --no-build | |
- name: Get current date | |
id: date | |
run: echo "date=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT |