Bump version to 1.3.0 #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
tags: | |
- 'v[1-9]+.[0-9]+.[0-9]+' | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up .NET Core SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Set up DocFx | |
uses: crazy-max/ghaction-chocolatey@v2 | |
with: | |
args: install docfx | |
- name: Build DocFx | |
working-directory: docfx_project | |
run: docfx docfx.json | |
continue-on-error: false | |
# Workaround for github-pages-deploy-action, which requires Ubuntu. | |
- name: Upload DocFx artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: site | |
path: docfx_project/_site | |
- name: Generate NuGet package | |
working-directory: PrinceXML.Wrapper | |
run: dotnet pack -c Release | |
- name: Publish NuGet package | |
working-directory: PrinceXML.Wrapper/bin/Release | |
run: | | |
dotnet nuget push *.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{ secrets.NUGET_ORG_API_KEY }} | |
deploy: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Download DocFx artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: site | |
- name: Set release version | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Deploy DocFx to versioned folder | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: docs | |
folder: site | |
target-folder: ${{ env.RELEASE_VERSION }} | |
- name: Deploy DocFx to latest folder | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: docs | |
folder: site | |
clean: true | |
target-folder: current |