Skip to content

Commit 5410bd1

Browse files
committed
chore: move repo checkout on publish workflow
1 parent 21c9ec1 commit 5410bd1

2 files changed

Lines changed: 11 additions & 14 deletions

File tree

.github/actions/setup-publish/action.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
name: Setup publish
22
description: Setup steps for publishing packages
33

4-
inputs:
5-
branch:
6-
required: true
7-
84
runs:
95
using: 'composite'
106
steps:
11-
- name: Checkout repository
12-
uses: actions/checkout@v4
13-
with:
14-
fetch-depth: 0
15-
ref: ${{ inputs.branch }}
16-
177
- name: Install pnpm
188
uses: pnpm/action-setup@v4
199
with:

.github/workflows/publish.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,13 @@ jobs:
4242
id-token: write # OIDC for provenance if npm publish happens here
4343
runs-on: ubuntu-latest
4444
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v4
47+
with:
48+
fetch-depth: 0
49+
4550
- name: Setup publish
4651
uses: ./.github/actions/setup-publish
47-
with:
48-
branch: ${{ github.ref_name }}
4952

5053
# This action creates a release pull request with all of
5154
# the package versions and changelogs updated. When there
@@ -112,10 +115,14 @@ jobs:
112115
id-token: write # OIDC for provenance when npm publish happens
113116
runs-on: ubuntu-latest
114117
steps:
118+
# Checkout the branch selected when triggering the workflow
119+
- name: Checkout repository
120+
uses: actions/checkout@v4
121+
with:
122+
fetch-depth: 0
123+
115124
- name: Setup publish
116125
uses: ./.github/actions/setup-publish
117-
with:
118-
branch: ${{ github.ref_name }}
119126

120127
- name: Version packages for snapshot
121128
run: pnpm changeset version --snapshot ${{ inputs.snapshot_tag }}

0 commit comments

Comments
 (0)