Skip to content

Commit

Permalink
chore(github-actions): add workflows for lint and publish (#638)
Browse files Browse the repository at this point in the history
* ci: add workflows for publish and lint

* chore: use version 34.0.0 for symmetric release

* ci(release): set publish config to public

* ci(gh-actions): add node test workflow

Co-authored-by: Austin McGee <947888+amcgee@users.noreply.github.com>

BREAKING CHANGE: Ensure that the plugin and app versions are locked to each other.
  • Loading branch information
varl committed Feb 12, 2020
1 parent 724cb90 commit 739bb13
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/node-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'DHIS2: Style'

on:
push:
branches:
- master
pull_request:

jobs:
pr:
name: Lint
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Install
run: yarn install --frozen-lockfile

- name: Run linters
run: yarn lint
env:
CI: true
41 changes: 41 additions & 0 deletions .github/workflows/node-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 'DHIS2: Release'

on:
push:
branches:
- master

jobs:
process:
name: Publish
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Install
run: yarn install --frozen-lockfile

- name: Lint
run: yarn lint

- name: Test
run: yarn test

- name: Build
run: yarn build

- name: Publish to NPM
run: npx @dhis2/cli-utils release --publish npm
env:
GIT_AUTHOR_NAME: '@dhis2-bot'
GIT_AUTHOR_EMAIL: 'apps@dhis2.org'
GIT_COMMITTER_NAME: '@dhis2-bot'
GIT_COMMITTER_EMAIL: 'apps@dhis2.org'
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
GH_TOKEN: ${{secrets.GH_TOKEN}}
env:
CI: true
26 changes: 26 additions & 0 deletions .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'DHIS2: Tests'

on:
push:
branches:
- master
pull_request:

jobs:
pr:
name: Unit
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Install
run: yarn install --frozen-lockfile

- name: Test
run: yarn test
env:
CI: true
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-visualizer-app",
"version": "32.0.2",
"version": "34.0.0",
"description": "DHIS2 Data Visualizer app",
"license": "BSD-3-Clause",
"private": true,
Expand Down
6 changes: 5 additions & 1 deletion packages/plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"name": "@dhis2/data-visualizer-plugin",
"version": "33.1.6",
"version": "34.0.0",
"description": "DHIS2 Data Visualizer plugin",
"main": "./build/cjs/lib.js",
"module": "./build/es/lib.js",
"license": "BSD-3-Clause",
"private": false,
"publishConfig": {
"access": "public"
},
"dependencies": {
"@dhis2/analytics": "^3.2.0",
"@material-ui/core": "^3.1.2",
Expand Down

0 comments on commit 739bb13

Please sign in to comment.