-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (40 loc) · 942 Bytes
/
release.yml
File metadata and controls
46 lines (40 loc) · 942 Bytes
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
name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
workflow_dispatch:
inputs:
dry-run:
description: Perform a dry run
type: boolean
default: false
env:
PYPI_PACKAGE: hexdoc-hexdebug
permissions:
contents: read
jobs:
build-docs:
uses: ./.github/workflows/docs.yml
permissions:
contents: write
pages: read
with:
deploy-pages: ${{ github.event_name == 'push' || !inputs.dry-run }}
release: true
publish-pypi:
needs: build-docs
if: github.event_name == 'push' || !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