-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e36fc74
commit 8f475a1
Showing
2 changed files
with
55 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
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,55 @@ | ||
name: Auto Bump Version | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # Trigger on push to main branch | ||
|
||
jobs: | ||
bump: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '14' | ||
|
||
- run: corepack enable | ||
|
||
- name: Install dependencies | ||
run: yarn install --mode skip-build | ||
env: | ||
# yarn runs in immutable mode "by default" in CI -- turning this off requires an | ||
# undocumented env var | ||
YARN_ENABLE_IMMUTABLE_INSTALLS: false | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --global user.name 'github-actions' | ||
git config --global user.email '[email protected]' | ||
- name: Bump version in root package.json | ||
run: yarn version patch | ||
|
||
- name: Bump version in subdirectory package.json | ||
working-directory: packages/studio | ||
run: yarn version patch | ||
|
||
- name: Commit version bumps | ||
run: | | ||
git add package.json yarn.lock packages/studio/package.json | ||
git commit -m "chore: bump versions in root and studio package.json" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push changes | ||
run: | | ||
git push origin main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |