Deploy Production 13/7/67 Attempt 2 #60
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
name: Sync beta to main | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
sync: | |
name: Sync beta to main | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
# Only run this job if the pull request is merged and the base branch is 'changeset-release/main', or if manually triggered | |
if: ${{ (github.event.pull_request.merged == true && github.head_ref == 'changeset-release/main') || github.event_name == 'workflow_dispatch' }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
ref: beta | |
fetch-depth: 0 | |
- name: Rebase beta to main | |
run: | | |
git rebase origin/main | |
- name: Install Changeset | |
run: npm install -g @changesets/cli | |
# force enter prerelease mode for beta | |
- name: Enter pre-release mode for Beta | |
run: npx changeset pre enter beta | |
- name: Push beta to origin | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add .changeset/pre.json | |
git commit -m "Enter pre-release mode" | |
git push origin beta |