Skip to content

publish

publish #30

Workflow file for this run

# Builds a final release version and pushes to nuget.org
# whenever a release is published.
# Requires: secrets.NUGET_API_KEY
name: publish
on:
workflow_dispatch:
release:
types: [prereleased, released] # pre-release
env:
DOTNET_NOLOGO: true
Configuration: Release
PackOnBuild: true
VersionLabel: ${{ github.ref }}
defaults:
run:
shell: pwsh
jobs:
publish:
runs-on: windows-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 🙏 build
run: dotnet build -m:1
- name: 🧪 test
run: dotnet test
- name: ⚙ func 4.x
run: npm i -g azure-functions-core-tools@4 --unsafe-perm true
- name: 🔓 login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: 🚀 deploy
working-directory: src\Web
run: func azure functionapp publish sponsorlink --dotnet-isolated
- name: 🚀 nuget
if: github.ref_type == 'tag'
working-directory: bin
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate