Skip to content

Release

Release #18

Workflow file for this run

name: Release
on:
push:
tags: 'v[0-9]+.[0-9]+.[0-9]+*'
workflow_dispatch:
inputs:
publish-docs:
description: Publish the web book
type: boolean
default: false
dry-run:
description: Perform a dry run
type: boolean
default: false
env:
PYPI_PACKAGE: hexdoc-hexdebug
permissions:
contents: read
jobs:
build-docs:
uses: hexdoc-dev/actions/.github/workflows/hexdoc.yml@v1
permissions:
contents: write
pages: read
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
python-version: 3.11
deploy-pages: ${{ github.event_name == 'push' || inputs.publish-docs && !inputs.dry-run }}
release: true
publish-docs:
needs: build-docs
if: github.event_name == 'push' || inputs.publish-docs && !inputs.dry-run
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/${{ env.PYPI_PACKAGE }}
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: hexdoc-build
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1