Skip to content

Commit

Permalink
Update GitHub actions (versions / ergonomics).
Browse files Browse the repository at this point in the history
This change set bumps the referenced / reusable GitHub actions to their
latest versions, bumps node versions, and enables reuse of a “test” wf.
  • Loading branch information
theengineear committed Feb 28, 2024
1 parent 1ebdedc commit 5dabce3
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 29 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/check-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Run tests on pushes to all branches.
name: Check Branch
on: [push]
jobs:
test:
uses: Netflix/x-element/.github/workflows/test.yml
21 changes: 21 additions & 0 deletions .github/workflows/publish-to-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Publish package to npm whenever a release is pushed.
# See https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish to npm
on:
release:
types: [published]
jobs:
test:
uses: Netflix/x-element/.github/workflows/test.yml
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
23 changes: 0 additions & 23 deletions .github/workflows/release.yml

This file was deleted.

12 changes: 6 additions & 6 deletions .github/workflows/push.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Push
on: [push]
name: Test
on: [workflow_call]
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '18.x'
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm ci
- run: npm run lint
- run: npm start &
- run: sleep 2
Expand Down

0 comments on commit 5dabce3

Please sign in to comment.