Skip to content

Publish ua-parser

Publish ua-parser #3

Workflow file for this run

name: Publish ua-parser
on:
workflow_dispatch:
release:
types: [created]
env:
ENVNAME: ${{ github.event_name == 'release' && 'pypi' || 'testpypi' }}
ENVURL: https://${{ github.event_name != 'release' && 'test.' || '' }}pypy.org/p/ua-parser
jobs:
release:
runs-on: ubuntu-latest
environment:
name: ${{ env.ENVNAME }}

Check failure on line 17 in .github/workflows/release-main.yml

View workflow run for this annotation

GitHub Actions / Publish ua-parser

Invalid workflow file

The workflow is not valid. .github/workflows/release-main.yml (Line: 17, Col: 13): Unrecognized named-value: 'env'. Located at position 1 within expression: env.ENVNAME
url: ${{ env.ENVURL }}
permissions:
id-token: write
steps:
- name: Checkout working copy
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependency
run: |
python -mpip install --upgrade pip
python -mpip install build
- name: Build sdist and wheel
run: python -mbuild
- name: Publish to testpypi
if: ${{ env.ENVNAME == 'testpypi' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
verbose: true
password: ${{ secrets.PUBLISH_TOKEN }}
- name: Publish to pypi
if: ${{ env.ENVNAME == 'pypi' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
password: ${{ secrets.PUBLISH_TOKEN }}