-
Notifications
You must be signed in to change notification settings - Fork 15
39 lines (34 loc) · 1 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
name: Release
on:
workflow_call:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Pull latest version tag
run: |
git fetch
git pull
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
echo "LATEST_VERSION=${LATEST_TAG:1}" >> $GITHUB_ENV
- name: Retrieve build items
uses: actions/cache@v3
id: build-dotnet-cache
with:
path: ./**/Release/*.nupkg
key: build-dotnet-cache-${{ github.sha }}
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.LATEST_TAG }}
name: ${{ env.LATEST_VERSION }}
token: ${{ secrets.BOT_PAT }}
generate_release_notes: true
files: |
LICENSE
# other files will be appended during/after publish