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 released version | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: ubuntu-22.04 | |
permissions: | |
id-token: write # mandatory for PyPI trusted publishing | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: pyproject.toml | |
architecture: x64 | |
- name: Install dependencies (and project) | |
run: | | |
pip install -U pip | |
pip install -e .[scripts] | |
- name: Generate fuzzy rules | |
run: python rules/generate_rules.py | |
- name: Build Javascript wombatSetup.js | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: node:20-bookworm | |
options: -v ${{ github.workspace }}/src/warc2zim/statics:/output -v ${{ github.workspace }}/rules:/src/rules -v ${{ github.workspace }}/javascript:/src/javascript -v ${{ github.workspace }}/build_js.sh:/src/build_js.sh | |
run: | | |
/src/build_js.sh | |
- name: Build packages | |
run: | | |
pip install -U pip build | |
python -m build --sdist --wheel | |
- name: Upload to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1.8 | |
- name: Build and push Docker image | |
uses: openzim/docker-publish-action@v10 | |
with: | |
image-name: openzim/warc2zim | |
tag-pattern: /^v([0-9.]+)$/ | |
latest-on-tag: true | |
restrict-to: openzim/warc2zim | |
registries: ghcr.io | |
credentials: | |
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }} | |
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }} | |
repo_description: auto | |
repo_overview: auto |