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

fix(github-workflows): update build and test workflows for Crosswind #8

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 25 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
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
env:
CI: true

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

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

- name: Test and run coverage
run: npm run test:ci
52 changes: 32 additions & 20 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,48 @@ on:
- master

jobs:
build:
publish:
runs-on: ubuntu-latest

permissions:
contents: write # to be able to publish a Github release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC tokens for npm provenance

strategy:
matrix:
node: [12]
node-version:
- 12.x
env:
CI: true

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

- name: Set up Nodejs v${{ 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 clean-install

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

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

- name: Publish release
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]
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx -p node@v18-lts -c "npx semantic-release"
19 changes: 0 additions & 19 deletions .github/workflows/pull-request.yml

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/erbium
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

A pure JavaScript module for drag and drop form creation.

![npm](https://img.shields.io/npm/v/formeo.svg) ![GitHub](https://img.shields.io/github/license/Draggable/formeo.svg) [![build](https://github.com/Draggable/formeo/workflows/build/badge.svg)](https://github.com/Draggable/formeo/actions?query=workflow%3Abuild)

## [Demo](https://draggable.github.io/formeo/)

[![formeo-demo](https://user-images.githubusercontent.com/1457540/54798148-72c3c400-4c14-11e9-9d3f-bafe1ce0c8c1.gif)](https://draggable.github.io/formeo/)
![npm](https://img.shields.io/npm/v/formeo.svg) ![GitHub](https://img.shields.io/github/license/crosswindtech/formeo.svg) [![build](https://github.com/crosswindtech/formeo/workflows/build/badge.svg)](https://github.com/crosswindtech/formeo/actions?query=workflow%3Abuild)

## Features

Expand All @@ -21,13 +17,13 @@ A pure JavaScript module for drag and drop form creation.

### NPM

```
```sh
npm install --save formeo
```

### Manual

```
```html
<script src="https://draggable.github.io/formeo/assets/js/formeo.min.js"></script>
```

Expand All @@ -50,6 +46,6 @@ const renderer = new FormeoRenderer(options)
renderer.render(formData)
```

## [Docs](https://github.com/Draggable/formeo/blob/master/docs/README.md)
## [Docs](https://github.com/crosswindtech/formeo/blob/master/docs/README.md)

## [Changelog](https://github.com/Draggable/formeo/blob/master/CHANGELOG.md)
## [Changelog](https://github.com/crosswindtech/formeo/blob/master/CHANGELOG.md)
Loading
Loading