Skip to content

Commit

Permalink
[Actions] Node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
magicjar committed Oct 14, 2024
1 parent 35cda7e commit 9b9d672
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ jobs:
name: Release
runs-on: ubuntu-latest

strategy:
matrix:
node: [20]

steps:
- name: Clone repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Create release
id: create_release
Expand All @@ -28,12 +32,12 @@ jobs:

steps:
- name: Clone repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 12
node-version: ${{ matrix.node }}
registry-url: https://registry.npmjs.org/

- name: Checkout tag
Expand All @@ -42,6 +46,7 @@ jobs:
git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
- name: Run publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish --access public || { echo "Publishing failed"; exit 1; }
26 changes: 12 additions & 14 deletions .github/workflows/ts-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,32 @@ jobs:

strategy:
matrix:
node: [12]
node: [20]

steps:
- name: Clone repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Set up npm cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-node-${{ matrix.node }}-
- name: Install dependencies
run: |
npm ci || { echo "NPM install failed. Check logs."; exit 1; }
- name: Run compile
run: npm run compile-all
run: npm ci

- name: Run test
run: npm run test
- name: Compile and Run Tests
run: |
npm run compile-all
npm run test
- name: Upload npm debug log
if: failure()
Expand All @@ -47,4 +45,4 @@ jobs:
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit 9b9d672

Please sign in to comment.