Glassure 2.1.0 #11
Workflow file for this run
This file contains hidden or 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@v4 | |
| 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: Install dependencies | |
| run: poetry install | |
| - name: Build Package | |
| run: poetry build | |
| - name: Upload wheels to artifact | |
| uses: actions/upload-artifact@v4 | |
| 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/[email protected] | |
| 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 |