[release-spm]: Version and checksum update for 2.38.1 #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Release PR | |
on: | |
push: | |
branches: | |
- pre-release-[0-9]+.[0-9]+.[0-9]+ | |
permissions: | |
pull-requests: write | |
jobs: | |
create-release-pr: | |
name: Create Release PR | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
persist-credentials: false | |
- name: Extract release version | |
id: extract_release_version | |
run: | | |
next_version=$(echo "${{ github.ref_name }}" | \ | |
awk 'match($0, /[0-9]+\.[0-9]+\.[0-9]+/) { print substr($0, RSTART, RLENGTH) }') | |
# assert next_version is not empty | |
[[ ! -z "$next_version" ]] || exit 1 | |
# export to outputs | |
echo "version=$next_version" >> "$GITHUB_OUTPUT" | |
- name: Create PR | |
env: | |
GH_TOKEN: ${{ github.token }} | |
RELEASE_VERSION: ${{ steps.extract_release_version.outputs.version }} | |
run: | | |
gh pr create \ | |
--title "[release-spm]: Version and checksum update for $RELEASE_VERSION" \ | |
--body "Update for package manifest and version for the next release" \ | |
--base main | |