2525 container :
2626 image : ghcr.io/viamrobotics/canon:amd64
2727 outputs :
28- sha : ${{ steps.commit.outputs.commit_long_sha }}
2928 version : ${{ steps.bump_version.outputs.version }}
3029 steps :
3130 - name : Check if organization member
@@ -36,20 +35,18 @@ jobs:
3635 username : ${{ github.actor }}
3736 token : ${{ secrets.GITHUB_TOKEN }}
3837
39- - name : cancelling
38+ - name : Cancelling - user not part of organization
40394140 if : |
4241 steps.is_organization_member.outputs.result == 'false'
4342
4443 - name : Checkout Code
4544 uses : actions/checkout@v3
46- with :
47- token : ${{ secrets.REPO_READ_TOKEN }}
4845
4946 - name : Install Poetry
5047 uses : snok/install-poetry@v1
5148
52- - name : Install package
49+ - name : Install Package
5350 run : poetry install
5451
5552 - name : Clean Format Test
@@ -60,14 +57,31 @@ jobs:
6057 run : |
6158 poetry version ${{ inputs.version }}
6259 echo "SDK_VERSION=$(poetry version -s)" >> $GITHUB_ENV
63- echo "::set-output name=version::$(poetry version -s)"
60+ echo "version=$(poetry version -s)" >> $GITHUB_OUTPUT
61+
62+ - name : Check if release exists
63+ uses :
cardinalby/[email protected] 64+ id : release_exists
65+ env :
66+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
67+ with :
68+ releaseName : v${{ env.SDK_VERSION }}
69+ doNotFailIfNotFound : ' true'
70+
71+ - name : Cancelling - release already exists
72+ 73+ if : |
74+ steps.release_exists.outputs.id != ''
6475
65- - name : Commit + Push
66- id : commit
67- 76+ - name : Add + Commit + Open PR
77+ uses : peter-evans/create-pull-request@v5
6878 with :
69- default_author : github_actions
70- message : Bumping version to v${{ env.SDK_VERSION }} [skip ci]
79+ commit-message : Bump version to ${{ env.SDK_VERSION }}
80+ branch : rc-${{ env.SDK_VERSION }}
81+ delete-branch : true
82+ base : main
83+ title : rc-${{ env.SDK_VERSION }}
84+ body : This is an auto-generated PR to merge the rc branch back into main upon successful release.
7185
7286 build :
7387 needs : prepare
97111 - name : Checkout Code
98112 uses : actions/checkout@v3
99113 with :
100- ref : ${{ needs.prepare.outputs.sha }}
114+ ref : rc- ${{ needs.prepare.outputs.version }}
101115
102116 - name : Install Poetry
103117 uses : snok/install-poetry@v1
0 commit comments