-
Notifications
You must be signed in to change notification settings - Fork 27
48 lines (38 loc) · 1.05 KB
/
deploy.yml
File metadata and controls
48 lines (38 loc) · 1.05 KB
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
name: deploy
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
default: '1.2.3'
jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Build and Check Package
uses: hynek/build-and-inspect-python-package@v2.13
deploy:
needs: package
runs-on: ubuntu-latest
permissions:
id-token: write # For PyPI trusted publishers.
contents: write # For tag.
steps:
- uses: actions/checkout@v5
- name: Download Package
uses: actions/download-artifact@v5
with:
name: Packages
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.13.0
with:
attestations: true
- name: GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v${{ github.event.inputs.version }} --target=${{ github.ref_name }} --title v${{ github.event.inputs.version }}
gh pr merge ${{ github.ref_name }} --merge