@@ -118,7 +118,12 @@ jobs:
118118 which pnpm
119119 env | grep -E 'PNPM|NPM|NODE|PATH'
120120 - run : pnpm install --frozen-lockfile
121- - run : pnpm semantic-release
121+ - run : |
122+ if [ "${{ inputs.RUN_RELEASE }}" = "1" ]; then
123+ pnpm semantic-release
124+ else
125+ echo "Skipping semantic-release because RUN_RELEASE != 1"
126+ fi
122127 env:
123128 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124129 SCOPE: ${{ secrets.scope }}
@@ -127,50 +132,4 @@ jobs:
127132 RUN_TEST: ${{ inputs.RUN_TEST }}
128133 RUN_BUILD: ${{ inputs.RUN_BUILD }}
129134 RUN_LINT: ${{ inputs.RUN_LINT }}
130-
131- # sync-stage-with-main:
132- # name: Sync Stage with Main (after release)
133- # needs: release
134- # if: github.ref == 'refs/heads/main' && github.event_name == 'push'
135- # runs-on: ubuntu-latest
136- # permissions:
137- # contents: write
138- # pull-requests: write
139- # steps:
140- # - name: Checkout all branches
141- # uses: actions/checkout@v4
142- # with:
143- # fetch-depth: 0
144- # token: ${{ secrets.GITHUB_TOKEN }}
145- # - name: Set up Git user
146- # run: |
147- # git config user.name "github-actions[bot]"
148- # git config user.email "github-actions[bot]@users.noreply.github.com"
149- # - name: Fetch all branches
150- # run: |
151- # git fetch origin main
152- # git fetch origin stage
153- # - name: Check if stage can be fast-forwarded to main
154- # id: ffcheck
155- # run: |
156- # git checkout stage
157- # if git merge-base --is-ancestor stage main; then
158- # echo "can_ff=true" >> $GITHUB_OUTPUT
159- # else
160- # echo "can_ff=false" >> $GITHUB_OUTPUT
161- # fi
162- # - name: Fast-forward stage to main (if possible)
163- # if: steps.ffcheck.outputs.can_ff == 'true'
164- # run: |
165- # git checkout stage
166- # git merge --ff-only main
167- # git push origin stage
168- # - name: Create PR from main to stage (if fast-forward not possible)
169- # if: steps.ffcheck.outputs.can_ff == 'false'
170- # uses: repo-sync/pull-request@v2
171- # with:
172- # source_branch: main
173- # destination_branch: stage
174- # pr_title: "chore: sync stage with main after release"
175- # pr_body: "Automated PR to sync stage with main after a semantic-release bump."
176- # github_token: ${{ secrets.GITHUB_TOKEN }}
135+ RUN_RELEASE: ${{ inputs.RUN_RELEASE }}
0 commit comments