Skip to content

Commit 3a236d9

Browse files
committed
Update deploy workflow to be manual and require approvals
1 parent 95e758a commit 3a236d9

File tree

3 files changed

+22
-17
lines changed

3 files changed

+22
-17
lines changed

.github/workflows/deploy.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
name: deploy
22

33
on:
4-
push:
5-
tags:
6-
- "[0-9]+.[0-9]+.[0-9]+"
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Release version'
8+
required: true
9+
default: '1.2.3'
710

811
jobs:
912

1013
deploy:
1114
runs-on: ubuntu-latest
15+
environment: deploy
16+
permissions:
17+
id-token: write # For PyPI trusted publishers.
18+
contents: write # For tag and release notes.
19+
env:
20+
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.version }}
1221

1322
steps:
1423
- uses: actions/checkout@v3
@@ -23,12 +32,8 @@ jobs:
2332
path: dist
2433

2534
- name: Publish package to PyPI
26-
uses: pypa/gh-action-pypi-publish@master
27-
with:
28-
user: __token__
29-
password: ${{ secrets.pypi_token }}
35+
uses: pypa/[email protected]
3036

31-
- name: Set up Python
32-
uses: actions/[email protected]
37+
- uses: actions-ecosystem/action-push-tag@v1
3338
with:
34-
python-version: "3.10"
39+
tag: ${{ github.event.inputs.version }}

HOWTORELEASE.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

RELEASING.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Here are the steps on how to make a new release.
2+
3+
1. Create a ``release-VERSION`` branch from ``upstream/main``.
4+
2. Update ``CHANGELOG.rst``.
5+
3. Push the branch to ``upstream``.
6+
4. Once all tests pass, start the ``deploy`` workflow manually.
7+
5. Merge the PR.

0 commit comments

Comments
 (0)