diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 65e18728..b5868633 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,10 +55,23 @@ jobs: git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} + pnpm exec nx release ${{ github.event.inputs.version || '' }} --skip-publish --verbose --dryRun=${{ github.event.inputs.dryRun }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Sync main with release 📤 + if: ${{ github.event.inputs.dryRun == 'false' }} + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + git fetch origin + git checkout main + git pull origin main + git merge origin/release --no-ff -m "chore: merge release into main" + git push origin main + - name: Build code 🛠 run: pnpm lib:build