Skip to content

Release

Release #11

Workflow file for this run

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/font.py --config "sources/family_config.yaml" \
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 sources/Lilex-Italic.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