Version bump to 1.2.0 #126
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 to PyPI | |
on: [push] | |
jobs: | |
build: | |
name: build package | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: install git lfs | |
run: | | |
sudo apt-get install git-lfs | |
git lfs install | |
- name: fetch lfs files | |
run: | | |
git lfs pull | |
- name: setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: install build tools | |
run: | | |
python -m pip install build --user | |
- name: build the sdist and wheel | |
run: | | |
python -m build | |
- name: upload the package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pyGCodeDecode-distributions | |
path: ./dist/ | |
publish_to_pypi: | |
name: publish package to PyPi | |
if: startsWith(github.ref, 'refs/tags/') # only publish on tag pushes | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/pyGCodeDecode | |
permissions: | |
id-token: write # IMPORTANT: mandatory for trusted publishing | |
steps: | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: pyGCodeDecode-distributions | |
path: dist/ | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |