Skip to content

Commit

Permalink
ci: refine CI workflows for operational clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
cfisher-scottlogic committed Apr 17, 2024
1 parent 87d2372 commit c9117e1
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 70 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/build.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Development

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_call:

jobs:
build-test:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: "Setup Node"
uses: actions/setup-node@v3
with:
node-version: latest

- name: "Install dependencies"
run: npm ci

- name: "Build"
run: |
npm run bundle
npm run bundle-min
- name: "Run tests"
run: npm test

lint:
name: Code standards
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: "Setup Node"
uses: actions/setup-node@v3
with:
node-version: latest

- name: "Install dependencies"
run: npm ci

- name: "Lint code"
run: npm run lint

- name: "Lint commit"
run: npm run commitlint
40 changes: 0 additions & 40 deletions .github/workflows/npm-publish.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release

on:
push:
branches: [ "master" ]

jobs:
build-test-lint:
name: Build, test, and lint
uses: ./.github/workflows/development.yml

publish-npm:
name: Publish npm package(s)
needs: build-test-lint
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: "Setup Node"
uses: actions/setup-node@v3
with:
node-version: latest
registry-url: https://registry.npmjs.org/

- name: "Install dependencies"
run: npm ci

- name: "Publish"
run: npm run publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit c9117e1

Please sign in to comment.