@@ -29,22 +29,37 @@ jobs:
29
29
30
30
- name : Upload Coverage
31
31
uses : codecov/codecov-action@v1
32
-
33
32
publish :
34
33
needs : test
35
- if : ${{ !startsWith(github.event.head_commit.message, 'bump: ') && !startsWith(github.event.head_commit.message, 'chore') && github.ref == 'refs/heads/develop ' && github.event_name == 'push' && github.repository_owner == 'supabase-community' }}
34
+ if : ${{ !startsWith(github.event.head_commit.message, 'bump') && !startsWith(github.event.head_commit.message, 'chore') && github.ref == 'refs/heads/main ' && github.event_name == 'push' && github.repository_owner == 'supabase-community' }}
36
35
runs-on : ubuntu-latest
37
36
name : " Bump version, create changelog and publish"
37
+ environment :
38
+ name : pypi
39
+ url : https://pypi.org/p/gotrue
40
+ permissions :
41
+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
42
+ contents : write # needed for github actions bot to write to repo
38
43
steps :
39
44
- name : Clone Repository
40
- uses : actions/checkout@v2
45
+ uses : actions/checkout@v3
41
46
with :
42
47
ref : ${{ github.ref }}
43
48
fetch-depth : 0
44
-
45
49
- name : Python Semantic Release
46
-
50
+ id : release
51
+ uses :
python-semantic-release/[email protected]
52
+ with :
53
+ github_token : ${{ secrets.GITHUB_TOKEN }}
54
+
55
+ - name : Publish package distributions to PyPI
56
+ uses : pypa/gh-action-pypi-publish@release/v1
57
+ # NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
58
+ # See https://github.com/actions/runner/issues/1173
59
+ if : steps.release.outputs.released == 'true'
60
+
61
+ - name : Publish package distributions to GitHub Releases
62
+ uses : python-semantic-release/upload-to-gh-release@main
63
+ if : steps.release.outputs.released == 'true'
47
64
with :
48
65
github_token : ${{ secrets.GITHUB_TOKEN }}
49
- repository_username : __token__
50
- repository_password : ${{ secrets.PYPI_TOKEN }}
0 commit comments