37 lines
986 B
YAML
37 lines
986 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 https://git.119.224.65.18.sslip.io/api/packages/CSSUDII/nuget/index.json \
|
|
--api-key ${NUGET_TOKEN}
|
|
env:
|
|
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
|