-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Add workflow to run the script to update the required extension…
… version
- Loading branch information
1 parent
5fc48a9
commit 17738a5
Showing
1 changed file
with
57 additions
and
0 deletions.
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,57 @@ | ||
name: Update required extension version | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- '*' | ||
# schedule: | ||
# - cron: '0 0 1 * *' # Run on the first day of every month | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1001/bus | ||
SHELL: /usr/bin/bash | ||
|
||
strategy: | ||
matrix: | ||
node-version: [20] | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Update required extension version | ||
run: bash scripts/update-extension-version.sh | ||
|
||
- name: Verify file changes | ||
uses: tj-actions/verify-changed-files@v17 | ||
id: verify-changed-files | ||
with: | ||
# The script generates a new wasm file and replaces the existing one. Git will treat it as a different file even it is generated with the same commit and CLI | ||
# Hence, we only compare the parser.info. It should be enough to tell the difference | ||
files: | | ||
integration-tests/src/utils/version.ts | ||
- name: Create pull request | ||
if: steps.verify-changed-files.outputs.files_changed == 'true' | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
add-paths: | | ||
integration-tests/src/utils/version.ts | ||
title: Auto update required extension version | ||
commit-message: Auto update required extension version | ||
token: ${{ secrets.GITHUB_TOKEN }} |