-
Notifications
You must be signed in to change notification settings - Fork 457
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: cd production version [SFUI2-1185] (#2839)
once any commit lands into v2 branch yarn changeset publish of package should happen if error happens, exit - do nothing if no error, then create automatically PR with changes (changelog) v2 -> v2-develop if no conflicts then automerge if conflict resolve it manually in any case of adding extra commit, PR action rerun and if no conflicts, the will automerge
- Loading branch information
1 parent
6b0d33e
commit c524ee4
Showing
4 changed files
with
62 additions
and
44 deletions.
There are no files selected for viewing
File renamed without changes.
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,25 @@ | ||
name: Helper - Auto-merge PR with `automerge` label | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- labeled | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
- edited | ||
branches: | ||
- v2-develop | ||
|
||
jobs: | ||
automerge: | ||
runs-on: ubuntu-latest | ||
if: ${{ startsWith(github.head_ref, 'v2' )}} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- id: automerge | ||
name: automerge | ||
uses: 'pascalgn/[email protected]' | ||
env: | ||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' |
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,37 @@ | ||
name: Publish prod version and create sync PR | ||
on: | ||
push: | ||
branches: | ||
- v2 | ||
|
||
jobs: | ||
publish-and-create-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.node-version' | ||
cache: 'yarn' | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Install dependencies | ||
run: yarn --immutable | ||
- name: Publish Production version | ||
# run: yarn changeset publish | ||
run: echo publish package | ||
env: | ||
# Needs access to publish to npm | ||
# refresh token before Saturday, May 25, 2024 | ||
NPM_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }} | ||
- name: Create PR to develop | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh pr create -B v2-develop --title 'chore: automatic Sync v2->v2-develop PR' --body 'This Pull Request is generated automatically with changes pushed into `v2` branch. `v2` and `v2-develop` branches should be in-sync.' --label automerge || true | ||
- name: Merge created PR | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: gh pr merge --auto --merge |
This file was deleted.
Oops, something went wrong.