Skip to content

Commit

Permalink
Merge pull request #42 from github/dg/maintenance
Browse files Browse the repository at this point in the history
Actions/Node Maintenance
  • Loading branch information
dgreif authored Oct 15, 2024
2 parents 50b7f17 + 908dbb1 commit d4e78a3
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"args": { "VARIANT": "16" }
"args": { "VARIANT": "22" }
},

// Set *default* container specific settings.json values on container create.
Expand Down
25 changes: 15 additions & 10 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
name: Node.js CI
on: [push]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- run: npm install
- run: npm run build --if-present
- run: npm test
env:
CI: true
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- run: npm install
- run: npm run build --if-present
- run: npm test
env:
CI: true
12 changes: 8 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,27 @@ on:
release:
types: [created]

permissions:
contents: read
id-token: write

jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 22
registry-url: https://registry.npmjs.org/
cache: npm
- run: npm ci
- run: npm test
- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm whoami; npm --ignore-scripts publish
- run: npm whoami; npm --ignore-scripts publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
30 changes: 16 additions & 14 deletions package-lock.json

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

0 comments on commit d4e78a3

Please sign in to comment.