Skip to content

Release

Release #6

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to release'
required: true
permissions:
contents: write
id-token: write
jobs:
release:
name: Publish release
runs-on: ubuntu-latest
steps:
# see https://github.com/marketplace/actions/download-workflow-artifact
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: build_wheels.yml
path: wheels
- name: List and move wheels
run: |
mkdir dist
for artifact in wheels/*; do
for whl in "$artifact"/*.whl; do
base_name=$(basename "$artifact" | sed 's/jupyter-cadquery-orion-//')
new_name="jupyter-cadquery-orion-${base_name}.whl"
mv "$whl" "dist/$new_name"
done
done
rm -rf wheels
ls dist
# see https://github.com/marketplace/actions/create-release
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*.whl"
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.tag }}
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}