fix: exit pre-release mode #1
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: Exit pre-release mode | ||
on: workflow_dispatch | ||
jobs: | ||
exit-pre-release-mode: | ||
if: ${{ github.ref == 'refs/heads/beta/release-next' || github.ref == 'refs/heads/canary' }} | ||
name: exit pre-release mode | ||
runs-on: ubuntu-latest-m | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
id-token: write | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
fetch-depth: 0 | ||
- name: Install | ||
uses: ./.github/common-actions/install | ||
- name: remove pre.json | ||
# we only remove .changeset/pre.json here | ||
# since we want to keep the changeset files introduced in beta/release-next or canary branch | ||
# once we merge it to canary / main, those files will be removed in version PR in canary | ||
# and converted to corresponding changelogs | ||
run: npx rimraf .changeset/pre.json | ||
- name: Commit and push changes | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GA_ACCESS_TOKEN }} | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Junior Garcia [Github Actions]" | ||
git add -A | ||
git commit -m "ci(changesets): exit pre-release mode" | ||
git push https://${{ secrets.GA_ACCESS_TOKEN }}@github.com/${{ github.repository }} ${{ github.event.inputs.branch }} |