Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
fix(github-workflows): update build and test workflows for Crosswind
Browse files Browse the repository at this point in the history
  • Loading branch information
Dangeranger committed Dec 11, 2023
1 parent ff25038 commit b94d1d9
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 49 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,38 @@
name: build
name: Build and test

on:
push:
branches:
- master
branches: [master]
pull_request:
branches: [master]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node: [12]
node-version:
- 12.x
- 14.x
- 16.x
- 18.x

steps:
- uses: actions/checkout@v2
- name: Set up Nodejs ${{ matrix.node }}
uses: actions/setup-node@v1
- uses: actions/checkout@v3

- name: Use Nodejs ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
env:
CI: true
run: npm install
run: npm ci --only=production

- name: Build
run: npm run build
run: npm run build --if-present

- name: Test and run coverage
run: npm run test:ci
34 changes: 15 additions & 19 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,28 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [12]
node-version:
- 12.x
steps:
- uses: actions/checkout@v2
- name: Set up Nodejs ${{ matrix.node }}
uses: actions/setup-node@v1
- uses: actions/checkout@v3

- name: Set up Nodejs ${{ matrix.node-version }}
uses: actions/setup-node@v3

- name: Install dependencies
env:
CI: true
run: npm install
run: npm ci --only=production

- name: Test
run: npm test
run: npm run test:ci

- name: Build
run: npm run build
- name: Publish

- name: Publish release to GitHub
if: success()
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
- name: Build the new version for the demo
if: success()
run: npm run build
- name: Deploy - https://draggable.github.io/formeo/
if: success()
env:
GH_PAT: ${{ secrets.GH_TOKEN }}
BUILD_DIR: demo/
uses: maxheld83/[email protected]
run: |
npx -p node@v18-lts -c "npx semantic-release --extends npm"
19 changes: 0 additions & 19 deletions .github/workflows/pull-request.yml

This file was deleted.

0 comments on commit b94d1d9

Please sign in to comment.