Skip to content

Commit dda5299

Browse files
fix(ci): switch to pnpm
1 parent bf514be commit dda5299

File tree

2 files changed

+55
-41
lines changed

2 files changed

+55
-41
lines changed

.github/workflows/coveralls.yml

+31-35
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
#
2-
# ___ _ ___ _
3-
# | _ \__ _ _______ __ _____ _ _ __| | / __|___ _ _ ___ _ _ __ _| |_ ___ _ _
4-
# | _/ _` (_-<_-< V V / _ \ '_/ _` | | (_ / -_) ' \/ -_) '_/ _` | _/ _ \ '_|
5-
# |_| \__,_/__/__/\_/\_/\___/_| \__,_| \___\___|_||_\___|_| \__,_|\__\___/_|
6-
#
7-
# Password Generator
8-
# https://password-generator.pro/
9-
#
10-
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
11-
# Licensed under the MIT license
12-
#
13-
141
name: "Coveralls"
152

163
on:
@@ -22,43 +9,52 @@ on:
229
- "*"
2310

2411
jobs:
25-
job:
12+
build:
13+
2614
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [16.x]
19+
2720
steps:
28-
- name: Checkout Repo
29-
uses: actions/checkout@v2
21+
- run: echo ${{github.ref}}
22+
23+
- uses: actions/checkout@v2
24+
25+
- uses: pnpm/[email protected]
26+
with:
27+
version: 7
28+
29+
- name: Use Node.js ${{ matrix.node-version }}
30+
uses: actions/setup-node@v2
3031
with:
31-
persist-credentials: false
32+
node-version: ${{ matrix.node-version }}
33+
cache: "pnpm"
3234

33-
- name: Setup Node.js 14.x
35+
- name: Use Node.js ${{ matrix.node-version }}
3436
uses: actions/setup-node@v2
3537
with:
36-
node-version: 14.x
38+
node-version: ${{ matrix.node-version }}
39+
cache: "pnpm"
3740

38-
- name: Install yarn dependencies
39-
# run: yarn --frozen-lockfile --ignore-scripts
40-
run: |
41-
yarn install
41+
- name: Install dependencies
42+
run: pnpm install --frozen-lockfile
4243

43-
- name: Run lint fix
44-
run: |
45-
yarn run lint:fix
44+
- name: Lint fix
45+
run: pnpm run lint:fix
4646

4747
- name: Run prettier
48-
run: |
49-
yarn run format
48+
run: pnpm run format
5049

5150
- name: Run remark
52-
run: |
53-
yarn run lint:markdown
51+
run: pnpm run lint:markdown
5452

55-
- name: Building
56-
run: |
57-
yarn run build
53+
- name: Build
54+
run: pnpm run build
5855

5956
- name: Testing & Coverage
60-
run: |
61-
yarn run test
57+
run: pnpm run test
6258

6359
- name: Coveralls
6460
uses: coverallsapp/github-action@master

.github/workflows/release.yml

+24-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Dotfiles Release
1+
name: Release
22

33
on:
44
release:
@@ -15,7 +15,9 @@ jobs:
1515

1616
steps:
1717
- run: echo ${{github.ref}}
18+
1819
- uses: actions/checkout@v2
20+
1921
- uses: pnpm/[email protected]
2022
with:
2123
version: 7
@@ -25,36 +27,52 @@ jobs:
2527
with:
2628
node-version: ${{ matrix.node-version }}
2729
cache: "pnpm"
30+
2831
- name: Install dependencies
2932
run: pnpm install --frozen-lockfile
33+
34+
- name: Lint fix
35+
run: pnpm run lint:fix
36+
37+
- name: Run prettier
38+
run: pnpm run format
39+
40+
- name: Run remark
41+
run: pnpm run lint:markdown
42+
3043
- name: Build
31-
run: pnpm build
32-
- name: Test
33-
run: pnpm test
34-
- name: Lint
35-
run: pnpm lint
44+
run: pnpm run build
3645

46+
- name: Testing & Coverage
47+
run: pnpm run test
3748

3849
publish:
3950
needs: build
4051
runs-on: ubuntu-latest
4152
steps:
4253
- uses: actions/checkout@v2
54+
4355
- uses: pnpm/[email protected]
4456
with:
4557
version: 7
4658
registry-url: "https://registry.npmjs.org"
4759
scope: sebastienrousseau
60+
4861
- run: pnpm install --frozen-lockfile
62+
4963
- run: pnpm publish --access public --tag latest
5064
env:
5165
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
66+
5267
- name: Set package registry
5368
run: pnpm config set registry https://npm.pkg.github.com
69+
5470
- name: Github package registry authentication
5571
run: pnpm set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }}
72+
5673
- name: Npm registry authentication
5774
run: pnpm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
75+
5876
- name: Publish the package to Github and Npm package registries
5977
run: pnpm -r publish --access public
6078
env:

0 commit comments

Comments
 (0)