Skip to content

Commit

Permalink
Replace yarn with pnpm (#538)
Browse files Browse the repository at this point in the history
* Replace yarn with pnpm

* fix workflows

* simplify workflows

* fix naming

* fix typo
  • Loading branch information
lukasIO authored Nov 15, 2023
1 parent f186c66 commit 5478698
Show file tree
Hide file tree
Showing 9 changed files with 10,952 additions and 10,905 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/publish-template-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,21 @@ jobs:
working-directory: ./template-sdk
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
- uses: pnpm/action-setup@v2
with:
node-version: "16.x"

- uses: actions/cache@v3
version: 8
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
path: |
~/.npm
~/.config/yarn/global
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
node-version: 18
cache: "pnpm"
cache-dependency-path: ./template-sdk/pnpm-lock.yaml

- name: Install Yarn
run: |
npm install -g yarn
yarn install
- name: Install Dependencies
run: pnpm install

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

- name: Publish to npm
run: |
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/test-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: yarn install
- run: yarn build
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18
cache: "pnpm"
cache-dependency-path: ./template-default/pnpm-lock.yaml

- run: pnpm install
- run: pnpm build
11 changes: 5 additions & 6 deletions build/template/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ WORKDIR /workspace

RUN apt update
RUN apt install -y curl
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN apt update
RUN apt install -y nodejs yarn
RUN apt install -y nodejs
RUN npm install -g pnpm

# copy templates
COPY template-default/ .

# build
RUN yarn install
RUN yarn build
RUN pnpm install
RUN pnpm build
Loading

0 comments on commit 5478698

Please sign in to comment.