Skip to content

Commit 04a0952

Browse files
Chore/ext 7081/fix release branch logic (#2871)
* test: verbose version * fix: release workflow job step conditions * fix log level * fix: back to correct loglevel * fix: back to correct loglevel * chore, lerna debug
1 parent 1135cd9 commit 04a0952

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

.github/workflows/release.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,29 +76,39 @@ jobs:
7676
run: npm run build
7777

7878
- name: Version (main branch)
79-
if: github.ref == 'refs/heads/main'
79+
if: (github.event.workflow_run.head_branch || github.ref_name) == 'main'
8080
run: npm run version
8181
env:
8282
GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_TOKEN }}
8383

8484
- name: Publish (main branch)
85-
if: github.ref == 'refs/heads/main'
85+
if: (github.event.workflow_run.head_branch || github.ref_name) == 'main'
8686
run: npm run publish-packages
8787
env:
8888
GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_TOKEN }}
8989

9090
- name: Version (canary branch)
91-
if: github.ref == 'refs/heads/canary'
91+
if: (github.event.workflow_run.head_branch || github.ref_name) == 'canary'
9292
run: npm run version:canary
9393
env:
9494
GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_TOKEN }}
9595

9696
- name: Publish (canary branch)
97-
if: github.ref == 'refs/heads/canary'
97+
if: (github.event.workflow_run.head_branch || github.ref_name) == 'canary'
9898
run: npm run publish-packages:canary
9999
env:
100100
GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_TOKEN }}
101101

102+
- name: Print lerna debug log
103+
if: always()
104+
run: |
105+
if [ -f lerna-debug.log ]; then
106+
echo "=== lerna-debug.log ==="
107+
cat lerna-debug.log
108+
else
109+
echo "No lerna-debug.log found"
110+
fi
111+
102112
- name: Get latest release tag
103113
id: get-tag
104114
run: |

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"test": "lerna run test",
1414
"lint": "lerna run lint",
1515
"build": "lerna run build",
16-
"version": "lerna version --no-private --conventional-commits --create-release github --yes --exact",
17-
"publish-packages": "lerna publish from-git --yes --conventional-commits",
16+
"version": "lerna version --no-private --conventional-commits --create-release github --yes --exact --loglevel verbose",
17+
"publish-packages": "lerna publish from-git --yes --conventional-commits --loglevel verbose",
1818
"version:canary": "npm run version -- --conventional-prerelease --conventional-bump-prerelease --force-git-tag",
1919
"publish-packages:canary": "npm run publish-packages -- --canary",
2020
"pre-commit": "lerna run pre-commit",

0 commit comments

Comments
 (0)