-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The new flow is manually dispatch and will create a PR with the needed changes to update the default version.
- Loading branch information
1 parent
6c2b489
commit c8bb355
Showing
3 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Update Version | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
v8_version: | ||
description: 'The version to update to' | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
|
||
update-v8-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Getting V8 version | ||
id: get-current-v8-version | ||
run: | | ||
export V8_VERSION_CURRENT=`cat ./V8_DEFAULT_VERSION.txt` | ||
export V8_NUM_VERSION_CURRENT = echo ${ V8_VERSION_CURRENT } | awk -F \. {'print $1*1000000000 + $2*1000000 + $3*1000 + $4'} | ||
export V8_NUM_VERSION = echo ${{ inputs.v8_version }} | awk -F \. {'print $1*1000000000 + $2*1000000 + $3*1000 + $4'} | ||
echo "V8_VERSION_CURRENT=${V8_VERSION_CURRENT}" >> "$GITHUB_OUTPUT" | ||
echo "V8_NUM_VERSION_CURRENT=${V8_NUM_VERSION_CURRENT}" >> "$GITHUB_OUTPUT" | ||
echo "V8_NUM_VERSION=${V8_NUM_VERSION}" >> "$GITHUB_OUTPUT" | ||
- name: Check new version is geater than current version | ||
env: | ||
V8_VERSION_CURRENT: ${{ steps.get-current-v8-version.outputs.V8_VERSION_CURRENT }} | ||
V8_NUM_VERSION_CURRENT: ${{ steps.get-current-v8-version.outputs.V8_NUM_VERSION_CURRENT }} | ||
V8_NUM_VERSION: ${{ steps.get-current-v8-version.outputs.V8_NUM_VERSION }} | ||
if: ${{ env.V8_NUM_VERSION_CURRENT >= env.V8_NUM_VERSION }} | ||
run: | | ||
echo new version ${{ inputs.v8_version }} is not greater then current version ${{ env.V8_VERSION_CURRENT }} | ||
exit 1 | ||
- name: Update Version | ||
run: echo ${{ inputs.v8_version }} > ./V8_DEFAULT_VERSION.txt | ||
- name: Build | ||
run: V8_UPDATE_HEADERS=${{ inputs.v8_update_headers }} cargo build -vv | ||
- name: Run tests | ||
run: V8_UPDATE_HEADERS=${{ inputs.v8_update_headers }} cargo test -vv | ||
- name: Create PR if needed | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "auto user" | ||
git checkout -b auto_update_version_to_${{ inputs.v8_version }} | ||
git add ./V8_DEFAULT_VERSION.txt | ||
git add ./v8_c_api/src/v8include/* | ||
git commit -m "Auto update version to ${{ inputs.v8_version }}" | ||
git push origin auto_update_version_to_${{ inputs.v8_version }} | ||
gh pr create --title "Auto update version to ${{ inputs.v8_version }}" --body "Generated by GitHub action" --reviewer MeirShpilraien,vityafx |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
11.8.172.16 |
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