Skip to content

Add temp token.

Add temp token. #2

Workflow file for this run

name: Release
on:
push:
branches:
- release
jobs:
run_test_suite_workflow:
uses: ./.github/workflows/test_suite.yml
with:
branch: release
setup_poetry_and_publish_to_pypi:
runs-on: ubuntu-latest
needs: run_test_suite_workflow
steps:
- name: Checkout code on release
uses: actions/checkout@v4
with:
ref: release
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Configure GITHUB_TOKEN for Poetry
run: git config --global url."https://github.com/".insteadOf "[email protected]:"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate lock file
run: poetry lock
- name: Install dependencies
run: poetry install --no-root --with dev
- name: Build Python package and publish to PyPI
if: ${{ needs.run_test_suite_workflow.result == 'success' }}
env:
PYPI_TEMP_TOKEN: ${{ secrets.PYPI_TEMP_TOKEN }} # TODO: Set a new token in remote repo settings
run: poetry publish --build -u __token__ -p $PYPI_TEMP_TOKEN