Release #20
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: 'Release' | |
on: | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: ⬇️ Download artifacts from latest workflow | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: build.yml | |
workflow_conclusion: success | |
- name: 🔍 view artifacts to be used | |
run: ls -R | |
working-directory: . | |
- name: 🔢 prep environment | |
run: | | |
echo "VERSION=$(cat bin/version.txt)" >> "$GITHUB_ENV" | |
grep -m 2 -B 1000 '^## ' bin/release-history.md | tail -n +3 | head -n -2 > release-notes.md | |
cat release-notes.md | |
- name: Do It! | |
run: dotnet nuget push bin/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate | |
# https://github.com/softprops/action-gh-release | |
- name: 📦 create release | |
uses: softprops/action-gh-release@v1 | |
if: github.ref == 'refs/heads/master' | |
with: | |
tag_name: ${{ env.VERSION }} | |
name: ${{ env.VERSION }} | |
files: | | |
bin/*.nupkg | |
body_path: release-notes.md | |
discussion_category_name: announcements |