-
Notifications
You must be signed in to change notification settings - Fork 11
89 lines (77 loc) · 2.16 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Release
on:
workflow_dispatch:
inputs:
version:
description: Release version
required: true
type: string
jobs:
build:
uses: ./.github/workflows/build.yaml
with:
check: true
preview: true
publish:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
ssh-key: ${{ secrets.RELEASE_PRIVATE_KEY }}
fetch-depth: 0
persist-credentials: true
- name: Setup GitHub Actions bot
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup release environment
run: make configure
- name: Download build
uses: actions/download-artifact@v4
with:
name: Lilex
path: build
- name: Generate sources with new version
run: |
. venv/bin/activate
python scripts/lilex.py generate --version "${{ inputs.version }}"
python scripts/changelog.py notes Next > notes.md
python scripts/changelog.py release "${{ inputs.version }}"
- name: Replace builded font files
run: |
rm -rf fonts
mv build fonts
- name: Create git commit and tag
run: |
git add sources/Lilex.glyphs
git add CHANGELOG.md
git add fonts
git status
git commit -m "chore: release ${{ inputs.version }} 🔥"
git tag "${{ inputs.version }}"
- name: Pack build
run: |
cd fonts; zip -r ../Lilex.zip .
cd ..
- name: Push changes
uses: ad-m/github-push-action@master
with:
ssh: true
tags: true
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
name: ${{ inputs.version }}
tag_name: ${{ inputs.version }}
body_path: notes.md
token: ${{ secrets.USER_PAT }}
prerelease: ${{ contains(inputs.version, '-') }}
files: |
Lilex.zip