-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Showing
1 changed file
with
38 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,38 @@ | ||
name: Manage Changesets Mode | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
- next | ||
|
||
jobs: | ||
manage-pre-mode: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the repository | ||
- uses: actions/checkout@v3 | ||
|
||
# Setup Node.js | ||
- uses: actions/setup-node@v3 | ||
|
||
# Install dependencies | ||
- run: npm install | ||
|
||
# Run the script | ||
- name: Run pre mode script | ||
id: pre-mode | ||
run: | | ||
BRANCH=$(echo "${{ github.ref }}" | sed 's|refs/heads/||') | ||
./scripts/manage-pre-mode.sh "$BRANCH" | ||
# Commit if required | ||
- name: Commit changes | ||
if: env.needs_commit == 'true' | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git add .changeset/pre.json | ||
git commit -m "Update Changesets pre-release mode" | ||
git push |