-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (85 loc) · 2.27 KB
/
main.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Default branch
on:
push:
branches: [main]
jobs:
tests:
name: Run tests
uses: ./.github/workflows/tests.yml
release:
name: Publish release
needs: [tests]
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure git
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Download release artifacts
uses: actions/download-artifact@v4
with:
name: python-dist
path: dist/
- name: Create release
run: npx -p @release-it/bumper -p @release-it/conventional-changelog release-it
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pages:
name: GitHub pages
needs: [release]
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: https://rjw57.github.io/verify-oidc-identity/
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
test-pypi:
name: Publish to Test PyPI
needs: [release]
runs-on: ubuntu-24.04
permissions:
id-token: write
environment:
name: test-pypi
url: https://test.pypi.org/p/verify-oidc-identity
steps:
- name: Download release artifacts
uses: actions/download-artifact@v4
with:
name: python-dist
path: dist/
- name: Upload
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
pypi:
name: Publish to PyPI
needs: [test-pypi]
runs-on: ubuntu-24.04
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/verify-oidc-identity
steps:
- name: Download release artifacts
uses: actions/download-artifact@v4
with:
name: python-dist
path: dist/
- name: Upload
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true