Skip to content

Commit

Permalink
build(*): replace yarn with pnpm (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
garrappachc authored Feb 1, 2024
1 parent 46fdc6f commit b503b22
Show file tree
Hide file tree
Showing 6 changed files with 3,171 additions and 5,516 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,25 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
cache: pnpm

- name: Install dependencies
run: yarn install --immutable
run: pnpm install

- name: Install protoc
uses: arduino/setup-protoc@v1

- name: Generate proto files
run: yarn generate-proto
run: pnpm generate-proto

- name: Build
run: yarn build
run: pnpm build
27 changes: 14 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,42 @@ name: Publish Package to npmjs

on:
release:
types: [created]
types: [published]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
node-version: 20.x
cache: pnpm
registry-url: "https://registry.npmjs.org"
scope: "@tf2pickup-org"

- name: Install dependencies
run: yarn install --immutable
run: pnpm install

- name: Install protoc
uses: arduino/setup-protoc@v1

- name: Generate proto files
run: yarn generate-proto
run: pnpm generate-proto

- name: Build
run: yarn build
run: pnpm build

- name: Publish
run: yarn npm publish
run: pnpm publish --access public --no-git-checks
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
875 changes: 0 additions & 875 deletions .yarn/releases/yarn-3.7.0.cjs

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,5 @@
"@tsconfig/node16": "16.1.1",
"release-it": "17.0.3",
"typescript": "5.3.3"
},
"packageManager": "[email protected]"
}
}
Loading

0 comments on commit b503b22

Please sign in to comment.