Skip to content

Commit

Permalink
CI: use npm
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Jan 2, 2025
1 parent c22f28b commit d80a639
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ jobs:
registry-url: 'https://registry.npmjs.org' # to create .npmrc file with NODE_AUTH_TOKEN
node-version: 22
- name: Install Dependencies
run: yarn install
run: npm ci
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn run release
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.SHARED_BOT_NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.SHARED_BOT_NPM_TOKEN }}
- name: Publish next snapshot
if: steps.changesets.outputs.published != 'true'
run: |
yarn changeset version --snapshot next
yarn changeset publish --no-git-tag --snapshot --tag next
npm exec -- changeset version --snapshot next
npm exec -- changeset publish --no-git-tag --snapshot --tag next
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.SHARED_BOT_NPM_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
with:
node-version: ${{ matrix.node_version }}
- name: Install
run: yarn install
run: npm ci
- name: Test
run: yarn test
run: npm test
4 changes: 2 additions & 2 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
echo "REPO_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}')" >> $GITHUB_ENV
echo "CURRENT_VERSION=$(node -p 'require("./package.json").version')" >> $GITHUB_ENV
- name: Install
run: yarn install
run: npm ci
- name: Build
run: |
yarn install
npm ci
npm run website -- --metadataVersion="${CURRENT_VERSION}"
env:
OWNER_NAME: ${{ env.OWNER_NAME }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"scripts": {
"docs:toc": "markdown-toc -i README.md",
"release": "changeset publish",
"test": "mocha test/ && (cd example && yarn install && npm test)"
"test": "mocha test/ && (cd example && npm ci && npm test)"
},
"dependencies": {
"@textlint-rule/textlint-rule-no-invalid-control-character": "^3.0.0",
Expand Down

0 comments on commit d80a639

Please sign in to comment.