build: Move to decoder 2 #36
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 | |
# Actions for any tag. | |
# ----------------- | |
# Control variables (GitHub Secrets) | |
# ----------------- | |
# | |
# At the GitHub 'organisation' or 'project' level you must have the following | |
# GitHub 'Repository Secrets' defined (i.e. via 'Settings -> Secrets'): - | |
# | |
# PYPI_USERNAME | |
# PYPI_TOKEN | |
# | |
# ----------- | |
# Environment (GitHub Environments) | |
# ----------- | |
# | |
# Environment (none) | |
on: | |
push: | |
tags: | |
- '**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Inject slug/short variables | |
uses: rlespinasse/github-slug-action@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r package-requirements.txt | |
- name: Lint | |
run: pylint data_manager_metadata | |
- name: Build | |
run: | | |
sed -i s/"_METADATA_VERSION: str = '0.0.0'"/"_METADATA_VERSION: str = '${TAG:-0.0.0}'"/ data_manager_metadata/metadata.py | |
python setup.py bdist_wheel | |
- name: Publish | |
uses: pypa/gh-action-pypi-publish@release/v1 |