fb2converter release #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: fb2converter release | |
on: | |
create: | |
tags: | |
- "v*.*.*" | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Ubuntu version | |
run: lsb_release -a | |
- name: Download dictionaries | |
run: | | |
cd static/dictionaries | |
wget -r -l1 --no-parent -nd -A.pat.txt http://ctan.math.utah.edu/ctan/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/txt | |
wget -r -l1 --no-parent -nd -A.hyp.txt http://ctan.math.utah.edu/ctan/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/txt | |
for a in $(ls *.txt); do gzip $a; done | |
ls -lah | |
- name: Download sentences | |
run: | | |
cd static/sentences | |
curl -L https://api.github.com/repos/neurosnap/sentences/tarball | tar xz --wildcards '*/data/*.json' --strip-components=2 | |
for a in $(ls *.json); do gzip $a; done | |
ls -lah | |
- name: Get latest CMake and Ninja | |
uses: lukka/get-cmake@latest | |
with: | |
cmakeVersion: latest | |
ninjaVersion: latest | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.21' | |
- name: Build - win32 | |
env: | |
MSYSTEM_NAME: win32 | |
run: | | |
cmake -G Ninja -B build_win32 | |
cmake --build build_win32 --target release | |
- name: Build - win64 | |
env: | |
MSYSTEM_NAME: win64 | |
run: | | |
cmake -G Ninja -B build_win64 | |
cmake --build build_win64 --target release | |
- name: Build - linux_amd64 | |
env: | |
MSYSTEM_NAME: linux_amd64 | |
run: | | |
cmake -G Ninja -B build_linux_amd64 | |
cmake --build build_linux_amd64 --target release | |
- name: Build - linux_arm64 | |
env: | |
MSYSTEM_NAME: linux_arm64 | |
run: | | |
cmake -G Ninja -B build_linux_arm64 | |
cmake --build build_linux_arm64 --target release | |
- name: Build - linux_i386 | |
env: | |
MSYSTEM_NAME: linux_i386 | |
run: | | |
cmake -G Ninja -B build_linux_i386 | |
cmake --build build_linux_i386 --target release | |
- name: Build - darwin_amd64 | |
env: | |
MSYSTEM_NAME: darwin_amd64 | |
run: | | |
cmake -G Ninja -B build_darwin_amd64 | |
cmake --build build_darwin_amd64 --target release | |
- name: Build - darwin_arm64 | |
env: | |
MSYSTEM_NAME: darwin_arm64 | |
run: | | |
cmake -G Ninja -B build_darwin_arm64 | |
cmake --build build_darwin_arm64 --target release | |
- name: Sign release artifacts | |
# After lunar this could be replaced with "apt install minisign" | |
uses: thomasdesr/minisign-action@v1 | |
with: | |
args: -Sm fb2c_*.zip | |
minisign_key: ${{ secrets.minisign_key }} | |
password: ${{ secrets.minisign_password }} | |
- name: List results | |
run: ls -lah fb2c_* | |
- name: Upload release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
generate_release_notes: true | |
files: | | |
fb2c_*.zip | |
fb2c_*.minisig |