12
12
env :
13
13
PIP_DISABLE_PIP_VERSION_CHECK : " 1"
14
14
PIP_NO_PYTHON_VERSION_WARNING : " 1"
15
- PYTHON_LATEST : " 3.11"
16
15
17
16
jobs :
18
17
pre-commit :
21
20
- uses : actions/checkout@v3
22
21
- uses : actions/setup-python@v4
23
22
with :
24
- python-version : ${{ env.PYTHON_LATEST }}
23
+ python-version : " 3.x "
25
24
-
uses :
pre-commit/[email protected]
26
25
27
26
list :
@@ -56,14 +55,14 @@ jobs:
56
55
run : >
57
56
sudo apt-get update &&
58
57
sudo apt-get install -y libenchant-2-dev
59
- if : runner.os == 'Linux'
58
+ if : runner.os == 'Linux' && startsWith(matrix.noxenv, 'docs')
60
59
- name : Install dependencies
61
60
run : brew install enchant
62
- if : runner.os == 'macOS'
61
+ if : runner.os == 'macOS' && startsWith(matrix.noxenv, 'docs')
63
62
- name : Set up Python
64
63
uses : actions/setup-python@v4
65
64
with :
66
- python-version : ${{ env.PYTHON_LATEST }}
65
+ python-version : " 3.x "
67
66
- name : Set up nox
68
67
69
68
- name : Run nox
@@ -72,34 +71,30 @@ jobs:
72
71
packaging :
73
72
needs : ci
74
73
runs-on : ubuntu-latest
74
+ environment :
75
+ name : PyPI
76
+ url : https://pypi.org/p/jsonschema-specifications
77
+ permissions :
78
+ contents : write
79
+ id-token : write
75
80
76
81
steps :
77
82
- uses : actions/checkout@v3
78
83
- name : Set up Python
79
84
uses : actions/setup-python@v4
80
85
with :
81
- python-version : ${{ env.PYTHON_LATEST }}
86
+ python-version : " 3.x "
82
87
- name : Install dependencies
83
88
run : python -m pip install build
84
89
- name : Create packages
85
90
run : python -m build .
86
- - uses : actions/upload-artifact@v3
87
- with :
88
- name : dist
89
- path : dist
90
- - name : Publish the package
91
+ - name : Publish to PyPI
91
92
if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
92
93
uses : pypa/gh-action-pypi-publish@release/v1
93
- with :
94
- password : ${{ secrets.pypi_password }}
95
94
- name : Create a Release
96
95
if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
97
- uses : actions/github-script@v6
96
+ uses : softprops/action-gh-release@v1
98
97
with :
99
- github-token : ${{ secrets.GITHUB_TOKEN }}
100
-
101
- script : |
102
- await github.request(`POST /repos/${{ github.repository }}/releases`, {
103
- tag_name: "${{ github.ref }}",
104
- generate_release_notes: true
105
- });
98
+ files : |
99
+ dist/*
100
+ generate_release_notes : true
0 commit comments