From d2c9bf9888d4c99cb4cccdfc86b99d2012694400 Mon Sep 17 00:00:00 2001 From: Dominik Biedebach Date: Sun, 17 Nov 2024 16:48:16 +0100 Subject: [PATCH] add changeset workflow --- .github/workflows/changesets-mode.yml | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.github/workflows/changesets-mode.yml b/.github/workflows/changesets-mode.yml index e69de29bb..76cac3722 100644 --- a/.github/workflows/changesets-mode.yml +++ b/.github/workflows/changesets-mode.yml @@ -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 "actions@github.com" + git add .changeset/pre.json + git commit -m "Update Changesets pre-release mode" + git push \ No newline at end of file