v0.8.9 #26
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: Upload Python Package | |
# | |
#on: | |
# release: | |
# types: [published] | |
# | |
#jobs: | |
# deploy: | |
# runs-on: ubuntu-latest | |
# environment: release | |
# | |
# permissions: | |
# # This permission is required for trusted publishing. | |
# id-token: write | |
# contents: read | |
# | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: cvxgrp/.github/actions/release@main | |
name: Upload Python Package | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cvxgrp/.github/actions/setup-environment@main | |
with: | |
python-version: "${{ inputs.python-version || '3.10' }}" | |
- name: Change version in pyproject.toml | |
shell: bash | |
run: | | |
poetry version ${{ github.ref_name }} | |
poetry build | |
- name: Archive sphinx documentation | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
retention-days: 1 | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
environment: release | |
permissions: | |
# This permission is required for trusted publishing. | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
# - name: Install twine | |
# id: twine | |
# run : | | |
#- uses: cvxgrp/.github/actions/setup-environment@main | |
# with: | |
# python-version: "${{ inputs.python-version || '3.10' }}" | |
#- name: Change version in pyproject.toml | |
# shell: bash | |
# run: | | |
# poetry version ${{ github.ref_name }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
- name: Mint token | |
id: mint | |
uses: tschm/token-mint-action@v1.0.2 | |
- name: Publish the package | |
shell: bash | |
run: | | |
ls -all dist | |
pip install twine | |
twine upload --verbose -u __token__ -p '${{ steps.mint.outputs.api-token }}' dist |