File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 branches : [main]
88 workflow_dispatch : # Manual trigger
99 workflow_run :
10- workflows : ["Release (Manual)", "Release Please "]
10+ workflows : ["Publish "]
1111 types : [completed]
1212
1313permissions :
Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ on :
4+ push :
5+ tags : ["v*"]
6+ workflow_call :
7+ inputs :
8+ tag :
9+ required : true
10+ type : string
11+
12+ permissions :
13+ contents : write
14+ id-token : write
15+ attestations : write
16+
17+ jobs :
18+ publish :
19+ name : Build & publish to PyPI
20+ runs-on : ubuntu-24.04
21+ timeout-minutes : 10
22+ environment :
23+ name : pypi
24+ url : https://pypi.org/project/xarray_plotly
25+ steps :
26+ - uses : actions/checkout@v4
27+ with :
28+ ref : ${{ inputs.tag || github.ref_name }}
29+ fetch-depth : 0
30+
31+ - uses : astral-sh/setup-uv@v7
32+ with :
33+ enable-cache : true
34+
35+ - uses : actions/setup-python@v5
36+ with :
37+ python-version : " 3.12"
38+
39+ - name : Build
40+ run : uv build
41+
42+ - uses : pypa/gh-action-pypi-publish@release/v1
43+
44+ github-release :
45+ name : Create GitHub Release
46+ if : github.event_name == 'push'
47+ runs-on : ubuntu-24.04
48+ steps :
49+ - uses : actions/checkout@v4
50+ with :
51+ ref : ${{ github.ref_name }}
52+
53+ - name : Create GitHub Release
54+ run : |
55+ if [[ "$TAG" == *-* ]]; then
56+ gh release create "$TAG" --generate-notes --prerelease
57+ else
58+ gh release create "$TAG" --generate-notes
59+ fi
60+ env :
61+ GH_TOKEN : ${{ github.token }}
62+ TAG : ${{ github.ref_name }}
Load diff This file was deleted.
Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,16 +3,6 @@ name: Release
33on :
44 push :
55 branches : [main]
6- workflow_dispatch :
7- inputs :
8- branch :
9- description : Branch to create the release from
10- required : true
11- default : main
12- prerelease :
13- description : Create a pre-release
14- type : boolean
15- default : false
166
177permissions :
188 contents : write
@@ -35,17 +25,17 @@ jobs:
3525 - uses : googleapis/release-please-action@v4
3626 id : release
3727 with :
28+ token : ${{ steps.app-token.outputs.token }}
3829 config-file : .release-please-config.json
3930 manifest-file : .release-please-manifest.json
40- token : ${{ steps.app-token.outputs.token }}
41- target-branch : ${{ inputs.branch || github.ref_name }}
42- prerelease : ${{ inputs.prerelease }}
4331
4432 publish :
45- needs : [ release-please]
33+ needs : release-please
4634 if : needs.release-please.outputs.release_created
4735 permissions :
4836 id-token : write
49- uses : ./.github/workflows/publish.yml
37+ contents : write
38+ attestations : write
39+ uses : ./.github/workflows/publish.yaml
5040 with :
5141 tag : ${{ needs.release-please.outputs.tag_name }}
You can’t perform that action at this time.
0 commit comments