File tree Expand file tree Collapse file tree 5 files changed +92
-96
lines changed Expand file tree Collapse file tree 5 files changed +92
-96
lines changed Original file line number Diff line number Diff line change 1+ name : Main
2+
13on :
24 push :
35
46jobs :
57 test :
68 name : Run tests
7- uses : ./.github/workflows/tests-template .yml
9+ uses : ./.github/workflows/tests.yml
810 release :
9- name : Create release
10- if : ${{ github.ref == 'refs/heads/main' }}
11- runs-on : ubuntu-24.04
11+ name : Release
12+ uses : ./.github/workflows/release.yml
13+ if : github.ref == 'refs/heads/main'
1214 permissions :
13- # Required to allow release-it to create releases
1415 contents : write
15- needs : [test]
16- steps :
17- - name : Checkout
18- uses : actions/checkout@v4
19- with :
20- fetch-depth : 0
21- - name : Set up Python
22- uses : actions/setup-python@v5
23- with :
24- python-version : " 3.12"
25- - name : Install poetry
26- uses : abatilo/actions-poetry@v3
27- - name : Configure git
28- run : |
29- git config user.name "${GITHUB_ACTOR}"
30- git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
31- - name : Create release
32- run : npx -p @release-it/bumper -p @release-it/conventional-changelog release-it
33- env :
34- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35- - name : Upload artifacts for publication
36- uses : actions/upload-artifact@v4
37- with :
38- name : python-dist
39- path : dist/*
16+ id-token : write
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- name : Publish Release to PyPI
1+ name : PyPI
22
33on :
4- release :
5- types : [published]
4+ workflow_call :
5+ inputs :
6+ environment-name :
7+ required : true
8+ type : string
9+ environment-url :
10+ required : true
11+ type : string
12+ repository-url :
13+ required : true
14+ type : string
615
716jobs :
8- test-pypi-publish :
9- name : Publish to Test PyPI
10- uses : ./.github/workflows/pypi-template.yml
11- with :
12- environment-name : test-pypi
13- environment-url : https://test.pypi.org/p/pydantic-gitlab-webhooks
14- repository-url : https://test.pypi.org/legacy/
15- pypi-publish :
16- name : Publish to PyPI
17- needs : [test-pypi-publish]
18- uses : ./.github/workflows/pypi-template.yml
19- with :
20- environment-name : pypi
21- environment-url : https://pypi.org/p/pydantic-gitlab-webhooks
22- repository-url : https://pypi.org/legacy/
17+ publish :
18+ name : Publish PyPI package
19+ runs-on : ubuntu-24.04
20+ permissions :
21+ id-token : write
22+ environment :
23+ name : ${{ inputs.environment-name }}
24+ url : ${{ inputs.environment-url }}
25+ steps :
26+ - name : Download assets
27+ uses : robinraju/release-downloader@v1
28+ with :
29+ tag : " ${{ github.tag }}"
30+ out-file-path : dist/
31+ - name : Publish package distributions to PyPI
32+ uses : pypa/gh-action-pypi-publish@release/v1
33+ with :
34+ repository-url : ${{ inputs.repository-url }}
Original file line number Diff line number Diff line change 1+ name : Publish release
2+
3+ on :
4+ workflow_call :
5+
6+ jobs :
7+ release :
8+ name : Create
9+ runs-on : ubuntu-24.04
10+ permissions :
11+ contents : write
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v4
15+ with :
16+ fetch-depth : 0
17+ - name : Set up Python
18+ uses : actions/setup-python@v5
19+ with :
20+ python-version : " 3.12"
21+ - name : Install poetry
22+ uses : abatilo/actions-poetry@v3
23+ - name : Configure git
24+ run : |
25+ git config user.name "${GITHUB_ACTOR}"
26+ git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
27+ - name : Create release
28+ run : npx -p @release-it/bumper -p @release-it/conventional-changelog release-it
29+ env :
30+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31+ - name : Upload artifacts for publication
32+ uses : actions/upload-artifact@v4
33+ with :
34+ name : python-dist
35+ path : dist/*
36+ test-pypi-publish :
37+ name : Publish to Test PyPI
38+ uses : ./.github/workflows/pypi.yml
39+ needs : [release]
40+ permissions :
41+ id-token : write
42+ with :
43+ environment-name : test-pypi
44+ environment-url : https://test.pypi.org/p/pydantic-gitlab-webhooks
45+ repository-url : https://test.pypi.org/legacy/
46+ pypi-publish :
47+ name : Publish to PyPI
48+ needs : [test-pypi-publish]
49+ permissions :
50+ id-token : write
51+ uses : ./.github/workflows/pypi.yml
52+ with :
53+ environment-name : pypi
54+ environment-url : https://pypi.org/p/pydantic-gitlab-webhooks
55+ repository-url : https://pypi.org/legacy/
File renamed without changes.
You can’t perform that action at this time.
0 commit comments