Files
CSSUDII.Sodium/.github/workflows/release.yml
Lucas Petrino ef0c489d35
All checks were successful
/ build (push) Successful in 2m8s
Save source in action secret
2025-04-09 17:53:27 +12:00

38 lines
981 B
YAML

on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Extract version 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 ${NUGET_SOURCE} \
--api-key ${NUGET_TOKEN}
env:
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }}
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}