fix: global env variables access #4
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: Build and publish on version tag | ||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
branches: [main] | ||
env: | ||
TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
TAG_VERSION: ${{ github.ref_name }} | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
VERSION: ${{ env.TAG_VERSION }} | ||
Check failure on line 19 in .github/workflows/publish.yaml
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
- name: Build package | ||
run: | | ||
poetry version ${VERSION#v} | ||
poetry build | ||
- name: Archive production artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist | ||
retention-days: 1 | ||
publish: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
- name: Download archive | ||
uses: actions/download-artifact@v4 | ||
- name: Config repository | ||
run: | | ||
poetry config pypi-token.pypi ${{ env.TOKEN }} | ||
poetry config http-basic.pypi multi_coop ${{ env.PASSWORD }} | ||
- name: Publish ${{ TAG_VERSION }} | ||
run: poetry publish |