Skip to content

release

release #13

Workflow file for this run

name: release
on:
workflow_dispatch:
jobs:
publish:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: ⬇️ Download artifacts from latest workflow
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
workflow_conclusion: success
- name: 🔢 prep environment
run: |
echo "VERSION=$(cat lib/version.txt)" >> "$GITHUB_ENV"
grep -m1 -B 1000 '^##\s' lib/release-history.md | tail -n +3 | head -n -2 > release-notes.md
cat release-notes.md
- name: 📢 Push to nuget.org
run: dotnet nuget push lib/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: 🥰 Create a release
uses: softprops/action-gh-release@v1
if: github.ref == 'refs/heads/master'
with:
tag_name: ${{ env.VERSION }}
name: ${{ env.VERSION }}
files: |
lib/*.nupkg
body_path: release-notes.md
# discussion_category_name: announcements