-
-
Notifications
You must be signed in to change notification settings - Fork 155
42 lines (34 loc) · 1.23 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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