Files
CSSUDII.Sodium/.github/workflows/release.yml
Lucas Petrino ef4d74d174
All checks were successful
/ build (push) Successful in 2m40s
Correct nuget publish repository
2025-03-18 13:46:42 +13:00

36 lines
1.2 KiB
YAML

on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Verify commit exists in origin/master
run: >
git fetch --no-tags --prune --depth=1 origin
+refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/master
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- 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 .
- name: Push
run: dotnet nuget push CSSUDII.Sodium.Interop.${VERSION}.nupkg --source
https://git.119.224.65.18.sslip.io/api/packages/CSSUDII/nuget/index.json
--api-key ${GITHUB_TOKEN}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}