38 lines
981 B
YAML
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 }}
|