Skip to content

Commit

Permalink
Merge pull request #419 from vscheuber/main
Browse files Browse the repository at this point in the history
update build node version to 18, update package-lock.json, audit dev …
  • Loading branch information
vscheuber authored Jun 20, 2024
2 parents 044548b + 80d3b4c commit 12ae322
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
workflow_dispatch:

env:
NODE_VERSION: 16
NODE_VERSION: 18

jobs:
build:
Expand Down Expand Up @@ -60,11 +60,14 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update package-log.json
run: npm i --package-lock-only

- name: Version From Tag
id: version-from-tag
run: echo "version=$(echo '${{ steps.version-bump.outputs.newTag }}' | sed 's/v//')" >> "$GITHUB_OUTPUT"

- name: Build esm, cjs, types
- name: Build library
run: npm run build

- name: Build docs
Expand All @@ -75,7 +78,7 @@ jobs:
run: npm run lint

- name: Security Audit
run: npm audit --omit dev --audit-level high
run: npm audit --audit-level high

- name: Zip build artifacts
run: zip -r build.zip dist mocks package.json package-lock.json snapshotResolve.js types docs
Expand All @@ -91,17 +94,17 @@ jobs:
newVersion: ${{ steps.version-from-tag.outputs.version }}
preRelease: ${{ contains(steps.version-bump.outputs.newTag, '-') }}

smoke-tests:
name: 'Smoke Tests'
test:
name: 'Test'
# You must use a Linux environment when using service containers or container jobs
runs-on: ubuntu-latest
needs: [build]
strategy:
matrix:
node-version: [20, 18, 16]
node-version: [22, 20, 18]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

# Service containers to run with `smoke-tests`
# Service containers to run with `test`
services:
# Label used to access the service container
squid:
Expand Down Expand Up @@ -168,7 +171,7 @@ jobs:
npm-release:
if: github.ref == 'refs/heads/main'
needs: [build, smoke-tests]
needs: [build, test]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
Expand All @@ -188,15 +191,15 @@ jobs:

- name: Pre-Release
if: ${{ fromJSON(needs.build.outputs.preRelease) }}
uses: JS-DevTools/npm-publish@v1
uses: JS-DevTools/npm-publish@v3
with:
access: public
tag: 'next'
token: ${{ secrets.NPM_ACCESS_TOKEN }}

- name: Release
if: ${{ ! fromJSON(needs.build.outputs.preRelease) }}
uses: JS-DevTools/npm-publish@v1
uses: JS-DevTools/npm-publish@v3
with:
access: public
token: ${{ secrets.NPM_ACCESS_TOKEN }}
Expand Down

0 comments on commit 12ae322

Please sign in to comment.