Konstantin Hintermayer 7f4ab6b9b6
Some checks failed
/ build (push) Failing after 1m48s
CI: Setup dotnet SDK before running automatic build
2025-05-17 14:52:11 +02:00

35 lines
1.1 KiB
YAML

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
- name: Verify commit exists in origin/main
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/main
- name: Set VERSION variable from tag
run: echo "VERSION=${GITEA_REF/refs\/tags\/v/}" >> $GITEA_ENV
- name: Setup Dotnet SDK
uses: https://github.com/actions/setup-dotnet@v4
- name: Build
run: dotnet build --configuration Release /p:Version=${VERSION}
- name: Test
run: dotnet test --configuration Release /p:Version=${VERSION} --no-build
- name: Pack
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
- uses: https://github.com/actions/upload-artifact@v4
with:
name: nuget
if-no-files-found: error
retention-days: 7
path: ./*.nupkg