Skip to content

0.1.0

0.1.0 #6

Workflow file for this run

name: Publication
on:
release:
types: [released]
env:
CARGO_TERM_COLOR: always
jobs:
do_publication:
name: Publish on crates.io
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download libzim
run: |
VERSION="9.2.1"
ARCHIVE_NAME="libzim_linux-x86_64-${VERSION}"
# Publish must work on a clean directory. Let's dl libzim in target directory as it is git ignored
mkdir target && cd target
wget "https://download.openzim.org/release/libzim/${ARCHIVE_NAME}.tar.gz"
tar xf ${ARCHIVE_NAME}.tar.gz
ARCHIVE_PATH=$(pwd)/${ARCHIVE_NAME}
LIBZIM_LIB=${ARCHIVE_PATH}/lib/x86_64-linux-gnu
echo "LIBZIM_LIB=$LIBZIM_LIB" >> $GITHUB_ENV
echo "LIBZIM_INCLUDE=${ARCHIVE_PATH}/include" >> $GITHUB_ENV
- name: Publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
cargo publish