Skip to content

Commit

Permalink
chore(repo): update workflows, node and actions versions
Browse files Browse the repository at this point in the history
  • Loading branch information
shellscape committed Sep 13, 2023
1 parent 0278630 commit 5469967
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 33 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/node-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,29 @@ jobs:

strategy:
matrix:
node: ['18', '16', '14']
node: ['20', '18']

name: Node v${{ matrix.node }}
steps:
- name: Configure git line-breaks
run: git config --global core.autocrlf false

- name: Checkout Commit
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Checkout Master
run: git branch -f master origin/master

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: install pnpm
run: npm install pnpm -g
- name: Enable Corepack
id: pnpm-setup
run: |
corepack enable
corepack prepare pnpm@latest --activate
- name: pnpm install
run: pnpm install --ignore-scripts
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check PR Title
uses: clowdhaus/actions/pr-title@v0.1.0
with:
Expand Down
40 changes: 31 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,56 @@ jobs:

steps:
- name: Checkout Commit
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Checkout Master
run: |
git branch -f master origin/master
git checkout master
- name: Enable Corepack
id: pnpm-setup
run: |
corepack enable
corepack prepare pnpm@latest --activate
pnpm config set script-shell "/usr/bin/bash"
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: pnpm Cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-setup.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: ESLint Cache
uses: actions/cache@v3
with:
path: ./.eslintcache
key: ${{ runner.os }}-eslintcache-${{ hashFiles('./eslintcache') }}
restore-keys: |
${{ runner.os }}-eslintcache-
- name: Sanity Check
run: |
echo git `git version`;
echo branch `git branch --show-current`;
echo node `node -v`;
echo pnpm `pnpm -v`
echo `moon --version`
- name: Initliaze .npmrc
run: >
echo -e "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}\n$(cat .npmrc)" > .npmrc
&& cat -n .npmrc
- name: Install pnpm
run: |
npm install pnpm -g;
echo node `pnpm -v`;
- name: Set Git Config
run: |
git config pull.rebase false
Expand All @@ -54,7 +76,7 @@ jobs:
git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}
- name: pnpm install
run: pnpm install
run: pnpm install --frozen-lockfile

- name: Build Packages
run: pnpm --recursive build
Expand Down
43 changes: 33 additions & 10 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,56 @@ jobs:

strategy:
matrix:
node: ['18', '16', '14']
node: ['20', '18']

name: Node v${{ matrix.node }}

steps:
- name: Checkout Commit
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Checkout Master
run: git branch -f master origin/master

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Checkout Master
run: git branch -f master origin/master
- name: Enable Corepack
id: pnpm-setup
run: |
corepack enable
corepack prepare pnpm@latest --activate
pnpm config set script-shell "/usr/bin/bash"
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: pnpm Cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-setup.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install pnpm
run: npm install pnpm -g
- name: ESLint Cache
uses: actions/cache@v3
with:
path: ./.eslintcache
key: ${{ runner.os }}-eslintcache-${{ hashFiles('./eslintcache') }}
restore-keys: |
${{ runner.os }}-eslintcache-
- name: Sanity Check
run: |
echo git `git version`;
echo branch `git branch --show-current`;
echo node `node --version`;
echo yarn `pnpm --version`
echo node `node -v`;
echo pnpm `pnpm -v`
echo `moon --version`
- name: pnpm install
run: pnpm install
run: pnpm install --frozen-lockfile

- name: Prettier
run: pnpm run prettier:check
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
20
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"husky": "8.0.1",
"lint-staged": "11.0.1",
"nyc": "^15.1.0",
"pnpm": "^7.12.2",
"pnpm": "^8.7.5",
"prettier-plugin-package": "^1.3.0",
"semver": "^7.3.2",
"source-map-support": "^0.5.21",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5469967

Please sign in to comment.