-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(release): support distribution tags and custom release user info (…
…#292) * feat(release): support distribution tags and custom release user info * ci(actions): add lint and test * chore(lint): resolve long-standing lint issues * ci(actions): update workflow templates Co-authored-by: Austin McGee <947888+amcgee@users.noreply.github.com>
- Loading branch information
Showing
22 changed files
with
216 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'dhis2-node lint' | ||
|
||
on: push | ||
|
||
jobs: | ||
check: | ||
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: | | ||
npx d2-style js check | ||
npx d2-style text check | ||
env: | ||
CI: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: 'dhis2-node publish' | ||
|
||
on: | ||
push: | ||
branches: | ||
# match branches in: | ||
# https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#branches | ||
- master | ||
- next | ||
- next-major | ||
- alpha | ||
- beta | ||
- '[0-9]+.x' | ||
- '[0-9]+.x.x' | ||
- '[0-9]+.[0-9]+.x' | ||
|
||
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}} | ||
|
||
jobs: | ||
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: Smoke | ||
run: ./packages/main/bin/d2 debug system | ||
|
||
- name: Test | ||
run: yarn test | ||
|
||
- name: Publish to NPM | ||
run: npx @dhis2/cli-utils release --publish npm | ||
env: | ||
CI: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: 'dhis2-node test' | ||
|
||
on: push | ||
|
||
jobs: | ||
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Introduction | ||
|
||
`d2 utils release` allows you to publish libraries and applications to | ||
various package repositories. | ||
|
||
# Usage | ||
|
||
Internally the `release` command utilizes [semantic | ||
release](https://github.com/semantic-release/semantic-release), so | ||
understanding how that tool operates is helpful. | ||
|
||
Simply put, every time a commit appears on the `master` branch, the | ||
fully automated release process begins, and the commit is released. | ||
|
||
# Advanced usage | ||
|
||
## Distribution channels | ||
|
||
We support the default channels recommended by semantic release, and | ||
there is a [good | ||
walkthrough](https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/distribution-channels.md) | ||
of them available on their docs. | ||
|
||
Our [GH Actions | ||
workflow](https://github.com/dhis2/workflows/blob/master/ci/node-publish.yml#L5) | ||
is kept in sync with those defaults. | ||
|
||
It is possible to e.g. only use the `master` branch for releases by | ||
restricting the `on.push.branches` list in the workflow file in the | ||
local repo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
# fo | ||
# Install the CLI | ||
|
||
``` | ||
yarn global add @dhis2/cli | ||
# or | ||
npm install --global @dhis2/cli | ||
``` | ||
|
||
# Verify that it is available on PATH | ||
|
||
``` | ||
d2 --version | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.