Skip to content

Commit b8e53a8

Browse files
committed
script fixes
1 parent ed199c3 commit b8e53a8

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ jobs:
1818
- uses: actions/setup-node@v3
1919
with:
2020
node-version: 18
21-
- run: yarn
21+
- run: |
22+
corepack enable; yarn
23+
env:
24+
COREPACK_ENABLE_DOWNLOAD_PROMPT: 0
2225
- run: |
2326
# Get tag name from event
2427
tag_name="${{ github.event.release.tag_name }}"
2528
26-
cmd="yarn publish"
29+
cmd="yarn npm publish"
2730
if [ "${{ github.event.release.prerelease }}" == "true" ]; then
2831
cmd+=" --tag=beta"
2932
else

.github/workflows/release.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,12 @@ jobs:
2828
app-id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
2929
private-key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
3030

31-
- name: Checkout ${{ github.base_ref }}
31+
- name: Checkout ${{ github.event.pull_request.base.ref }}
3232
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3333
with:
34-
fetch-depth: 1
3534
token: ${{ steps.get_token.outputs.token }}
3635
ref: ${{ github.event.pull_request.base.ref }}
37-
38-
- name: Checkout ${{ github.head_ref }}
39-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
40-
with:
41-
fetch-depth: 1
42-
token: ${{ steps.get_token.outputs.token }}
43-
ref: ${{ github.event.pull_request.head.ref }}
36+
fetch-depth: 0
4437

4538
- name: Release packages
4639
env:
@@ -49,7 +42,7 @@ jobs:
4942
GH_TOKEN: ${{ steps.get_token.outputs.token }}
5043
shell: bash
5144
run: |
52-
CHANGED_PACKAGE_JSON_FILES=$(git diff --name-only $BASE_SHA...$HEAD_SHA \
45+
CHANGED_PACKAGE_JSON_FILES=$(git diff --diff-filter=MACR --name-only $BASE_SHA...$HEAD_SHA \
5346
| grep -E 'package\.json$' \
5447
| xargs dirname \
5548
| sort \
@@ -95,5 +88,5 @@ jobs:
9588
"body": "See $package/CHANGELOG.md for details",
9689
"prerelease": $is_prerelease
9790
}
98-
EOF
91+
EOF
9992
done

0 commit comments

Comments
 (0)