Glassure 1.4.5 #7
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
# This workflow installs python, poetry, and builds the package | |
# It then uploads the wheels to the artifacts and later to PyPI | |
name: CD | |
on: | |
release: | |
types: [published] | |
jobs: | |
build_package: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ "3.12" ] | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'poetry' | |
- name: Add Dynamic Versioning Plugin | |
run: poetry self add poetry-dynamic-versioning[plugin] | |
- name: Build Package | |
run: poetry build | |
- name: Upload wheels to artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist/* | |
pypi-publish: | |
name: Upload release to PyPI | |
needs: build_package | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/glassure/ | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
- name: check the dist folder | |
run: ls dist | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |