Skip to content

v5.21.0

v5.21.0 #46

Workflow file for this run

name: Publish
on:
release:
types: [published]
env:
CARGO_INCREMENTAL: 0
CI: 1
RUST_BACKTRACE: short
RUSTFLAGS: "-D warnings"
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: "aarch64-linux-gnu-gcc"
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: "arm-linux-gnueabihf-gcc"
jobs:
build:
name: Build (${{ matrix.archive }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
archive: texlab-x86_64-windows.zip
- os: windows-latest
target: i686-pc-windows-msvc
archive: texlab-i686-windows.zip
- os: windows-latest
target: aarch64-pc-windows-msvc
archive: texlab-aarch64-windows.zip
- os: macos-latest
target: x86_64-apple-darwin
archive: texlab-x86_64-macos.tar.gz
- os: macos-latest
target: aarch64-apple-darwin
archive: texlab-aarch64-macos.tar.gz
- os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
archive: texlab-x86_64-linux.tar.gz
- os: ubuntu-20.04
target: aarch64-unknown-linux-gnu
archive: texlab-aarch64-linux.tar.gz
- os: ubuntu-20.04
target: armv7-unknown-linux-gnueabihf
archive: texlab-armv7hf-linux.tar.gz
- os: ubuntu-20.04
target: x86_64-unknown-linux-musl
archive: texlab-x86_64-alpine.tar.gz
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross-compilation dependencies
run: sudo apt-get install -y gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf
if: ${{ matrix.os == 'ubuntu-20.04' }}
- name: Compile
run: cargo build --target ${{ matrix.target }} --all-features --release --locked
- name: Compress (Windows)
if: ${{ contains(matrix.os, 'windows') }}
run: ${{ format('Compress-Archive target/{0}/release/texlab.exe {1}', matrix.target, matrix.archive) }}
- name: Compress (macOS)
if: ${{ contains(matrix.os, 'macos') }}
run: ${{ format('gtar -czvf {1} -C target/{0}/release texlab', matrix.target, matrix.archive) }}
- name: Compress (Linux)
if: ${{ contains(matrix.os, 'ubuntu') }}
run: ${{ format('tar -czvf {1} -C target/{0}/release texlab', matrix.target, matrix.archive) }}
- name: Upload binary archive
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: ${{ matrix.archive }}
github:
name: GitHub
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Publish binaries
run: |
gh release upload ${{ github.ref_name }} $(find . -iname texlab*.zip)
gh release upload ${{ github.ref_name }} $(find . -iname texlab*.tar.gz)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ctan:
name: CTAN
needs: [github]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install Tectonic workaround
run: |
sudo add-apt-repository universe
sudo apt-get install libfuse2 libssl3
- name: Install Tectonic
uses: wtfjoke/setup-tectonic@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate PDF documentation
run: |
mkdir texlab
tectonic texlab.tex -o texlab
- name: Generate man page
run: |
sudo apt-get install -y help2man
cargo build
help2man --output=texlab/texlab.1 --no-info "target/debug/texlab"
- name: Export to ZIP archive
run: |
git archive --prefix=texlab/ -o texlab.zip HEAD
zip -ur texlab.zip texlab/texlab.1 texlab/texlab.pdf
- uses: paolobrasolin/ctan-submit-action@v1
with:
action: upload
file_path: texlab.zip
fields: |
pkg: texlab
version: ${{ github.event.release.tag_name }}
uploader: Patrick Förster
email: patrick.foerster@outlook.de
update: 'true'