Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Adding bump version script #132

Merged
merged 2 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@
- [ ] The web version was tested and it is running ok
- [ ] The desktop version was tested and it is running ok
- [ ] I've updated/created the storybook file(s)
- [ ] The release version was updated on package.json files
55 changes: 55 additions & 0 deletions .github/workflows/bump-version.yml
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
laisspportugal marked this conversation as resolved.
Show resolved Hide resolved
working-directory: packages/studio
laisspportugal marked this conversation as resolved.
Show resolved Hide resolved
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"
laisspportugal marked this conversation as resolved.
Show resolved Hide resolved
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Push changes
run: |
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading