-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (50 loc) · 1.62 KB
/
Copy pathrelease.yml
File metadata and controls
58 lines (50 loc) · 1.62 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Release Sample Project
on:
push:
tags:
- 'v*'
jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout with LFS
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
- name: Create distribution zip
run: |
TAG_NAME="${GITHUB_REF_NAME}"
ZIP_NAME="TransitionFX_SampleProject_${TAG_NAME}.zip"
rsync -a \
--exclude='.git' \
--exclude='.github' \
--exclude='Binaries/' \
--exclude='Intermediate/' \
--exclude='Saved/' \
--exclude='DerivedDataCache/' \
--exclude='Build/' \
--exclude='Plugins/*/Binaries/' \
--exclude='Plugins/*/Intermediate/' \
--exclude='.vs/' \
--exclude='*.sln' \
--exclude='CONTRIBUTING.md' \
. /tmp/TransitionFX_SampleProject/
cd /tmp
zip -r "${ZIP_NAME}" TransitionFX_SampleProject/
mv "${ZIP_NAME}" "${GITHUB_WORKSPACE}/"
echo "ZIP_NAME=${ZIP_NAME}" >> $GITHUB_ENV
- name: Extract changelog notes
run: |
VERSION="${GITHUB_REF_NAME#v}"
awk "/^## \[${VERSION}\]/{found=1; next} found && /^## /{exit} found{print}" CHANGELOG.md > release_notes.txt
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${GITHUB_REF_NAME}" \
"${ZIP_NAME}" \
--title "TransitionFX ${GITHUB_REF_NAME}" \
--notes-file release_notes.txt