File tree Expand file tree Collapse file tree 3 files changed +26
-13
lines changed
Expand file tree Collapse file tree 3 files changed +26
-13
lines changed Original file line number Diff line number Diff line change 1+ /.github / @ tinymins
Original file line number Diff line number Diff line change @@ -3,6 +3,13 @@ name: Lint
33on :
44 push :
55 pull_request :
6+ workflow_dispatch :
7+ inputs :
8+ ref :
9+ description : ' Branch or tag to lint'
10+ required : false
11+ default : ' '
12+ type : string
613
714jobs :
815 lint :
1421 - uses : actions/checkout@v4
1522 with :
1623 fetch-depth : 0
24+ ref : ${{ github.event.inputs.ref || github.ref }}
1725
1826 - name : Set up Python 3.10
1927 uses : actions/setup-python@v3
Original file line number Diff line number Diff line change @@ -104,23 +104,27 @@ jobs:
104104 run : |
105105 python3 \!src-dist/ci.py
106106
107- - name : Push commits
107+ - name : Create Release Branch
108108 run : |
109+ VERSION="${{ github.event.inputs.version }}"
110+ BRANCH="release/v${VERSION}"
109111 git push -f origin master:stable
112+ git push -f origin master:$BRANCH
110113
111- - name : Create release branch and PR
112- env :
113- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
114+ - name : Create Pull Request
115+ id : create_pr
116+ uses : peter-evans/create-pull-request@v5
117+ with :
118+ token : ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}
119+ title : " release: v${{ github.event.inputs.version }}"
120+ body : " Automated release PR for version ${{ github.event.inputs.version }}"
121+ base : master
122+ branch : " release/v${{ github.event.inputs.version }}"
123+
124+ - name : Output PR URL
125+ if : steps.create_pr.outputs.pull-request-url
114126 run : |
115- VERSION="${{ github.event.inputs.version }}"
116- BRANCH="release/v${VERSION}"
117- git checkout -b $BRANCH
118- git push -u origin $BRANCH -f
119- gh pr create \
120- --title "release: v${VERSION}" \
121- --body "Automated release PR for version ${VERSION}" \
122- --base master \
123- --head $BRANCH || echo "PR already exists or failed to create, continuing..."
127+ echo "::notice::Pull Request created: ${{ steps.create_pr.outputs.pull-request-url }}"
124128
125129 - name : Upload Artifacts
126130 uses : actions/upload-artifact@v4
You can’t perform that action at this time.
0 commit comments