Skip to content

Commit

Permalink
ci(publish): tweak CI config for actions/checkout@v4
Browse files Browse the repository at this point in the history
  • Loading branch information
hasparus committed Sep 26, 2023
1 parent 8b3ebe5 commit 6f29731
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
with:
version: 7
version: 8

- uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
cache: 'pnpm'

- name: Install
Expand Down Expand Up @@ -74,18 +74,18 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v3

- name: Prepare repository
run: git fetch --unshallow --tags
- uses: actions/checkout@v4
with:
fetch-depth: 100
fetch-tags: true

- uses: pnpm/action-setup@v2
with:
version: 7
version: 8

- uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'

Expand Down
8 changes: 4 additions & 4 deletions scripts/publish-to-npm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import packageJson from '../package.json' assert { type: 'json' }

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

commitAndPush({ version, branch })
commitAndPush({ version })
publishToNPM({
tag:
branch === PRODUCTION_BRANCH
Expand Down Expand Up @@ -79,14 +79,14 @@ function getVersion(packageJson) {
}

/**
* @param {{ version: string, branch: string }} params
* @param {{ version: string }} params
*/
function commitAndPush({ version, branch }) {
function commitAndPush({ version }) {
exec(`
git config user.name 'Piotr Monwid-Olechnowicz'
git config user.email 'hasparus@gmail.com'
git commit -am "Bump versions to: ${version} [skip ci]"
git push origin HEAD:${branch}
git push
`)
}

Expand Down

0 comments on commit 6f29731

Please sign in to comment.