File tree Expand file tree Collapse file tree 6 files changed +81
-21
lines changed Expand file tree Collapse file tree 6 files changed +81
-21
lines changed Original file line number Diff line number Diff line change
1
+ minVersion : 0.34.0
2
+ targets :
3
+ - name : pypi
4
+ - name : github
5
+ - name : sentry-pypi
6
+ internalPypiRepo : getsentry/pypi
Original file line number Diff line number Diff line change
1
+ name : build
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches : [main, release/**, test-me-*]
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+ - uses : actions/setup-python@v4
14
+ with :
15
+ python-version : 3.x
16
+ - run : |
17
+ set -x
18
+ pip install build
19
+ python -m build
20
+ - uses : actions/upload-artifact@v4
21
+ with :
22
+ name : ${{ github.sha }}
23
+ path : dist/*
Original file line number Diff line number Diff line change 1
1
name : Release
2
2
3
3
on :
4
- release :
5
- types : [published]
4
+ workflow_dispatch :
5
+ inputs :
6
+ version :
7
+ description : Version to release
8
+ required : true
9
+ merge_target :
10
+ description : Target branch to merge into. Uses the default branch as a fallback (optional)
11
+ required : true
6
12
7
13
jobs :
8
- build-and-publish :
14
+ release :
9
15
runs-on : ubuntu-latest
10
- environment :
11
- name : release
12
- url : https://pypi.org/p/djangorestframework-stubs
13
- permissions :
14
- id-token : write
16
+ name : " Release a new version"
15
17
steps :
16
- - name : Setup python to build package
17
- uses : actions/setup-python@v5
18
- with :
19
- python-version : ' 3.12'
20
- - name : Install build
21
- run : python -m pip install build
22
18
- uses : actions/checkout@v4
23
19
with :
20
+ token : ${{ secrets.GH_RELEASE_PAT }}
24
21
fetch-depth : 0
25
- - name : Build package
26
- run : python -m build
27
- - name : Publish to PyPI
28
- uses : pypa/gh-action-pypi-publish@v1.12.4
22
+ - name : Prepare release
23
+ uses : getsentry/action-prepare-release@v1
24
+ env :
25
+ GITHUB_TOKEN : ${{ secrets.GH_RELEASE_PAT }}
26
+ with :
27
+ version : ${{ github.event.inputs.version }}
28
+ merge_target : ${{ github.event.inputs.merge_target }}
Original file line number Diff line number Diff line change 1
- <img src =" https://mypy-lang.org/static/mypy_light.svg " alt =" mypy logo " width =" 300px " />
1
+ sentry-forked-djangorestframework-stubs
2
+ =======================================
3
+
4
+ ### new release
5
+
6
+ make a new branch for the fork of an upstream tag:
7
+
8
+ ``` bash
9
+ git remote add upstream git@github.com:typeddjango/djangorestframework-stubs
10
+ git fetch upstream --tags
11
+ git push origin --tags
12
+ git checkout 1.2.3 -b sentry-1.2.3
13
+ ```
14
+
15
+ - cherry-pick the craft / release commit(s) into your branch from ` master `
16
+ - cherry-pick relevant commit(s) from previous releases
17
+
18
+ releases are done through craft in the release.yml workflow -- make sure to
19
+ target your particular branch with a ` -# ` release postfix (like ` 1.2.3-1 ` )
20
+
21
+ ___
22
+
23
+ <img src =" http://mypy-lang.org/static/mypy_light.svg " alt =" mypy logo " width =" 300px " />
2
24
3
25
# pep484 stubs for Django REST framework
4
26
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -euxo pipefail
3
+
4
+ if ! grep -E ' ^[0-9]+\.[0-9]+\.[0-9]+-[0-9]+$' <<< " $2" ; then
5
+ : " expected #.#.#-# got $2 "
6
+ exit 1
7
+ fi
8
+
9
+ sed -i " s/^ version=" ' "' " .*" ' "' " ,$/ version=" ' "' " $2 " ' "' " ,/" setup.py
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ def find_stub_files(name: str) -> list[str]:
19
19
readme = f .read ()
20
20
21
21
dependencies = [
22
- "django-stubs>=5.2.0" ,
22
+ "sentry-forked- django-stubs>=5.2.0" ,
23
23
"typing-extensions>=4.0" ,
24
24
"requests>=2.0" ,
25
25
"types-requests" ,
@@ -34,7 +34,7 @@ def find_stub_files(name: str) -> list[str]:
34
34
}
35
35
36
36
setup (
37
- name = "djangorestframework-stubs" ,
37
+ name = "sentry-forked- djangorestframework-stubs" ,
38
38
version = "3.16.0" ,
39
39
description = "PEP-484 stubs for django-rest-framework" ,
40
40
long_description = readme ,
You can’t perform that action at this time.
0 commit comments