add python package #129
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: Upload zip | |
on: | |
- push | |
- pull_request | |
- workflow_dispatch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.13' | |
cache: 'poetry' | |
- name: Install poetry | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry install | |
- name: Run python script | |
run: | | |
poetry run python -m chws_subset | |
- name: Make release zip | |
run: | | |
zip -9 -x "*.git*" -x "chws_subset*" -x "extra*" -x "poetry.lock" -x "pyproject.toml" -r ../notocjk.zip ./ | |
sha256sum ../notocjk.zip > ../notocjk.zip.sha256sum | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
../notocjk.zip | |
../notocjk.zip.sha256sum | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: notocjk | |
path: ./ | |