Fix readme link #204
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
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
env: | |
Configuration: Release | |
TreatWarningsAsErrors: true | |
WarningsNotAsErrors: 1591 | |
defaults: | |
run: | |
working-directory: src | |
outputs: | |
version: ${{ steps.version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- run: dotnet tool install -g GitVersion.Tool --version 5.10.0 | |
- name: Resolve version | |
id: version | |
run: | | |
dotnet-gitversion | |
dotnet-gitversion > version.json | |
version="$(jq -r '.SemVer' version.json)" | |
pr_version="$(jq -r '.MajorMinorPatch' version.json)-$(jq -r '.PreReleaseLabel' version.json).${{ github.run_number }}.${{ github.run_attempt }}" | |
if [ "${{ github.event_name }}" = "pull_request" ]; then version=$pr_version; fi | |
echo "Resolved version: $version" | |
echo "Version=${version}" >> "$GITHUB_ENV" | |
- run: dotnet restore --configfile nuget.config | |
- run: dotnet format --no-restore --verify-no-changes --severity info | |
- run: dotnet build --no-restore | |
- run: dotnet test --no-build | |
- uses: actions/checkout@v3 | |
with: | |
repository: josefpihrt/wordb | |
path: wordb | |
- run: dotnet tool install -g Roslynator.DotNet.Cli --version 0.7.0 | |
- run: | | |
roslynator spellcheck DotMarkdown.sln --dry-run --scope all --exclude DotMarkdown/LanguageIdentifiers.cs DotMarkdown/Emojis.cs --words \ | |
spellcheck \ | |
../wordb/data/en \ | |
../wordb/data/en-us \ | |
../wordb/data/names.txt \ | |
../wordb/data/tech.names.txt \ | |
../wordb/data/tech.acronyms.txt | |
- run: dotnet pack --no-build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: nuget_packages | |
path: src/DotMarkdown/bin/Release/*.*nupkg | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: nuget_packages | |
path: src/DotMarkdown.Docusaurus/bin/Release/*.*nupkg | |
publish: | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
if: github.ref_type == 'tag' | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: nuget_packages | |
path: nuget_packages | |
- run: dotnet nuget push "*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s "https://api.nuget.org/v3/index.json" | |
working-directory: nuget_packages |