v5.16.0 #40
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: Publish | |
on: | |
release: | |
types: [published] | |
env: | |
CARGO_INCREMENTAL: 0 | |
CI: 1 | |
RUST_BACKTRACE: short | |
RUSTFLAGS: "-D warnings" | |
jobs: | |
build: | |
name: Build (${{ matrix.archive }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
program: cargo | |
archive: texlab-x86_64-windows.zip | |
- os: windows-latest | |
target: i686-pc-windows-msvc | |
program: cargo | |
archive: texlab-i686-windows.zip | |
- os: windows-latest | |
target: aarch64-pc-windows-msvc | |
program: cargo | |
archive: texlab-aarch64-windows.zip | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
program: cargo | |
archive: texlab-x86_64-macos.tar.gz | |
- os: macos-latest | |
target: aarch64-apple-darwin | |
program: cargo | |
archive: texlab-aarch64-macos.tar.gz | |
- os: ubuntu-20.04 | |
target: x86_64-unknown-linux-gnu | |
program: cargo | |
archive: texlab-x86_64-linux.tar.gz | |
- os: ubuntu-20.04 | |
target: aarch64-unknown-linux-gnu | |
program: cross | |
archive: texlab-aarch64-linux.tar.gz | |
- os: ubuntu-20.04 | |
target: armv7-unknown-linux-gnueabihf | |
program: cross | |
archive: texlab-armv7hf-linux.tar.gz | |
- os: ubuntu-20.04 | |
target: x86_64-unknown-linux-musl | |
program: cargo | |
archive: texlab-x86_64-alpine.tar.gz | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target }} | |
- name: Install cross | |
if: ${{ matrix.program == 'cross' }} | |
run: cargo install cross | |
- name: Compile | |
run: ${{ matrix.program }} 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 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 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' |