Skip to content

github publish hawc client #5

github publish hawc client

github publish hawc client #5

Workflow file for this run

name: publish
on:
pull_request:
push:
branches:
- main
tags:
- "hawc-client-[0-9]+.[0-9]+"
workflow_dispatch:
jobs:
publish-hawc-client:
runs-on: ubuntu-22.04
permissions:
id-token: write
environment:
name: publish
url: https://test.pypi.org/project/hawc-client/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
cache: 'pip'
- name: install
run: python -m pip install -U pip wheel flit
- name: Build client
run: cd client && flit build
- name: Publish package to TestPyPI
env:
PUBLISH_PYPI: ${{ secrets.PUBLISH_PYPI }}
if: env.PUBLISH_PYPI != null
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
attestations: true
print-hash: true
packages-dir: client/dist/