-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (48 loc) · 1.27 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Release
# TODO: trigger this via Jenkins somehow?
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/hexdoc/.github/workflows/hexdoc.yml@v1!0.1.dev
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:
# hexdoc workflow uses v3, so we can't use v4 here
- uses: actions/download-artifact@v3
with:
name: hexdoc-build
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1