Skip to content

Update wiki dependency #55

Update wiki dependency

Update wiki dependency #55

Workflow file for this run

name: publish
env:
VERSION: '0.9.5-preview'
PRERELEASE: true
on:
push:
branches: [ main ]
jobs:
build:
name: build, pack, publish, and release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
# Semantic version range syntax or exact version of a dotnet version
dotnet-version: '8.x'
- name: Install dependencies
run: dotnet restore
working-directory: ./src
- name: Build
run: dotnet build --configuration Release -p:Version=${{ env.VERSION }} -p:ContinuousIntegrationBuild=true --no-restore --nologo
working-directory: ./src
#- name: Test
# run: dotnet test --no-restore --verbosity normal
# working-directory: ./src
- name: Fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Check tag
id: tagged
shell: bash
run: git show-ref --tags --verify --quiet -- "refs/tags/v${{ env.VERSION }}" && echo "tagged=0" >> "$GITHUB_OUTPUT" || echo "tagged=1" >> "$GITHUB_OUTPUT"
- name: Pack
if: steps.tagged.outputs.tagged == 1
run: dotnet pack --include-symbols -p:SymbolPackageFormat=snupkg -p:PackageVersion=${{ env.VERSION }} --configuration Release --no-build --nologo --output .
working-directory: ./src
- name: Push to NuGet
if: steps.tagged.outputs.tagged == 1
run: dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate
working-directory: ./src
- name: Git tag
if: steps.tagged.outputs.tagged == 1
run: git tag v${{ env.VERSION }}
- name: Push tag
if: steps.tagged.outputs.tagged == 1
run: git push origin v${{ env.VERSION }}
- name: Release
if: steps.tagged.outputs.tagged == 1
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: v${{ env.VERSION }}
release_name: Release v${{ env.VERSION }}
draft: false
prerelease: ${{ env.PRERELEASE }}
body: See [changelog](docs/CHANGELOG.md)