Skip to content

Commit

Permalink
ci: try new development/release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
cfisher-scottlogic committed Apr 16, 2024
1 parent 7a12227 commit e3dcfbf
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 135 deletions.
44 changes: 0 additions & 44 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
21 changes: 0 additions & 21 deletions .github/workflows/lint.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/npm-publish.yml

This file was deleted.

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

on:
push:
branches: [ "master" ]

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

publish-npm:
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}}
19 changes: 0 additions & 19 deletions .github/workflows/setup.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit e3dcfbf

Please sign in to comment.