Skip to content

Commit

Permalink
Merge pull request #88 from deitch/update-node-js-version
Browse files Browse the repository at this point in the history
use node-version 18 in Actions
  • Loading branch information
deitch authored Aug 11, 2023
2 parents f612eca + 3f8546b commit bb8be4f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
30 changes: 3 additions & 27 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '10.x'
node-version: '18'
- name: install
run: npm install
- name: build
Expand All @@ -37,27 +37,3 @@ jobs:
# should not need token as it is a public repo
with:
token: ${{secrets.CODECOV_TOKEN}}
# apparently, there is no way to condition the entire job, do we have to condition each
# and I also cannot make a workflow conditional, so I cannot make publish a separate workflow
publish:
name: Publish
runs-on: ubuntu-latest
needs: build
steps:
- name: checkout
if: github.event_name == 'create' && startsWith(github.ref,'refs/tags/')
uses: actions/checkout@v1
- name: setup node
if: github.event_name == 'create' && startsWith(github.ref,'refs/tags/')
uses: actions/setup-node@v1
with:
node-version: '10.x'
registry-url: 'https://registry.npmjs.org'
- name: install
run: npm install
- name: deploy
if: github.event_name == 'create' && startsWith(github.ref,'refs/tags/')
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

25 changes: 25 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Continuous Integration
on:
push:
tags:
- "v?[0-9]+.[0-9]+.[0-9]+"

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: install
run: npm install
- name: deploy
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit bb8be4f

Please sign in to comment.