-
Notifications
You must be signed in to change notification settings - Fork 13
41 lines (35 loc) · 1.22 KB
/
release.yaml
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
name: Package fonts and upload to release
on:
release:
# do not run when created/draft, only when finalised
types: [published]
jobs:
release:
if: github.event_name == 'release'
runs-on: ubuntu-latest
env:
FULL_ZIP_NAME: lxgw-wenkai-gb-${{ github.event.release.tag_name }}
steps:
- uses: actions/checkout@v4
# zip license
- run: cp OFL.txt fonts/TTF/OFL.txt
- name: Zip files
run: |
cd fonts
mv TTF ${{ env.FULL_ZIP_NAME }}
zip -r ${{ env.FULL_ZIP_NAME }}.zip ${{ env.FULL_ZIP_NAME }}
tar -czvf ${{ env.FULL_ZIP_NAME }}.tar.gz ${{ env.FULL_ZIP_NAME }}
mv ${{ env.FULL_ZIP_NAME }} TTF
cp ${{ env.FULL_ZIP_NAME }}.zip TTF/${{ env.FULL_ZIP_NAME }}.zip
cp ${{ env.FULL_ZIP_NAME }}.tar.gz TTF/${{ env.FULL_ZIP_NAME }}.tar.gz
# remove license
- run: rm fonts/TTF/OFL.txt
# upload files to releases
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
file: fonts/TTF/*
tag: ${{ github.ref }}
overwrite: true