v11.2.0 #32
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 Python Package | |
on: | |
release: | |
types: [created] | |
jobs: | |
build-n-publish: | |
name: Build and publish Python 🐍 distributions 📦 to PyPI | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
# this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install Poetry | |
run: | | |
pip install poetry | |
poetry self add "poetry-dynamic-versioning[plugin]" | |
- name: Install project dependencies | |
run: poetry install --no-interaction | |
- name: Install yq | |
env: | |
YQ_VERSION: v4.30.5 | |
YQ_BINARY: yq_linux_amd64 | |
run: | | |
mkdir -p $HOME/.local/bin | |
wget https://github.com/mikefarah/yq/releases/download/$YQ_VERSION/$YQ_BINARY.tar.gz -O - | tar xz && mv $YQ_BINARY $HOME/.local/bin/yq | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Generate project files | |
run: | | |
make clean schema-clean src/nmdc_submission_schema/schema/nmdc_submission_schema.yaml ingest-triad | |
poetry dynamic-versioning | |
make gen-project | |
make project/json/nmdc_submission_schema.json | |
cp -r project src/nmdc_submission_schema | |
- name: Build source and wheel archives | |
run: poetry build | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |