Skip to content

Commit 6f29731

Browse files
committed
ci(publish): tweak CI config for actions/checkout@v4
1 parent 8b3ebe5 commit 6f29731

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313
build:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717

1818
- uses: pnpm/action-setup@v2
1919
with:
20-
version: 7
20+
version: 8
2121

2222
- uses: actions/setup-node@v3
2323
with:
24-
node-version: 18.x
24+
node-version: 20.x
2525
cache: 'pnpm'
2626

2727
- name: Install
@@ -74,18 +74,18 @@ jobs:
7474
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7575
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7676
steps:
77-
- uses: actions/checkout@v3
78-
79-
- name: Prepare repository
80-
run: git fetch --unshallow --tags
77+
- uses: actions/checkout@v4
78+
with:
79+
fetch-depth: 100
80+
fetch-tags: true
8181

8282
- uses: pnpm/action-setup@v2
8383
with:
84-
version: 7
84+
version: 8
8585

8686
- uses: actions/setup-node@v3
8787
with:
88-
node-version: 18.x
88+
node-version: 20.x
8989
cache: 'pnpm'
9090
registry-url: 'https://registry.npmjs.org'
9191

scripts/publish-to-npm.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import packageJson from '../package.json' assert { type: 'json' }
1919

2020
if (checkStatus() === 'clear') process.exit(0)
2121

22-
commitAndPush({ version, branch })
22+
commitAndPush({ version })
2323
publishToNPM({
2424
tag:
2525
branch === PRODUCTION_BRANCH
@@ -79,14 +79,14 @@ function getVersion(packageJson) {
7979
}
8080

8181
/**
82-
* @param {{ version: string, branch: string }} params
82+
* @param {{ version: string }} params
8383
*/
84-
function commitAndPush({ version, branch }) {
84+
function commitAndPush({ version }) {
8585
exec(`
8686
git config user.name 'Piotr Monwid-Olechnowicz'
8787
git config user.email '[email protected]'
8888
git commit -am "Bump versions to: ${version} [skip ci]"
89-
git push origin HEAD:${branch}
89+
git push
9090
`)
9191
}
9292

0 commit comments

Comments
 (0)