-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #650 from dhis2/alpha-beta
chore: bring beta and alpha up-to-date with master, and merge alpha into beta
- Loading branch information
Showing
62 changed files
with
17,943 additions
and
1,305 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,48 @@ | ||
name: 'dhis2: deploy (netlify)' | ||
|
||
# Requirements: | ||
# | ||
# - Org secrets: | ||
# DHIS2_BOT_NETLIFY_TOKEN | ||
# DHIS2_BOT_GITHUB_TOKEN | ||
# - Repo secrets: | ||
# NETLIFY_SITE_ID | ||
# - Customize the 'jobs.build.steps.netlify-deploy.publish-dir' property | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
group: ${{ github.workflow}}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
if: "!github.event.push.repository.fork && github.actor != 'dependabot[bot]'" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- uses: c-hive/gha-yarn-cache@v1 | ||
- run: yarn install --frozen-lockfile | ||
|
||
- run: yarn docs:build | ||
|
||
- uses: nwtgck/[email protected] | ||
with: | ||
production-branch: 'master' | ||
production-deploy: true | ||
github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} | ||
deploy-message: 'Deploy documentation site from GitHub Actions' | ||
enable-pull-request-comment: false | ||
enable-commit-comment: false | ||
enable-commit-status: false | ||
publish-dir: 'dist' | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.DHIS2_BOT_NETLIFY_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |
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 |
---|---|---|
|
@@ -2,52 +2,29 @@ name: 'dhis2: verify (lib)' | |
|
||
on: push | ||
|
||
concurrency: | ||
group: ${{ github.workflow}}-${{ github.ref }} | ||
|
||
env: | ||
GIT_AUTHOR_NAME: '@dhis2-bot' | ||
GIT_AUTHOR_EMAIL: '[email protected]' | ||
GIT_COMMITTER_NAME: '@dhis2-bot' | ||
GIT_COMMITTER_EMAIL: '[email protected]' | ||
NPM_TOKEN: ${{secrets.DHIS2_BOT_NPM_TOKEN}} | ||
GH_TOKEN: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}} | ||
CI: true | ||
D2_VERBOSE: true | ||
|
||
jobs: | ||
install: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
run: yarn install --frozen-lockfile | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
needs: install | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
- uses: c-hive/gha-yarn-cache@v1 | ||
- run: yarn install --frozen-lockfile | ||
|
||
- name: Build | ||
run: yarn build | ||
|
@@ -62,49 +39,42 @@ jobs: | |
|
||
lint: | ||
runs-on: ubuntu-latest | ||
needs: [install] | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
- uses: c-hive/gha-yarn-cache@v1 | ||
- run: yarn install --frozen-lockfile | ||
|
||
- name: Build | ||
run: yarn build | ||
- run: yarn build | ||
|
||
- name: Lint | ||
run: yarn lint | ||
- run: yarn lint | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: [install] | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
needs: [build] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- uses: actions/cache@v2 | ||
id: yarn-cache | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
name: lib-build | ||
|
||
- uses: c-hive/gha-yarn-cache@v1 | ||
- run: yarn install --frozen-lockfile | ||
|
||
- name: Test | ||
run: yarn test | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
needs: [build, lint, test] | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
if: "!github.event.push.repository.fork && github.actor != 'dependabot[bot]'" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
|
@@ -117,5 +87,12 @@ jobs: | |
with: | ||
name: lib-build | ||
|
||
- name: Publish to NPM | ||
run: npx @dhis2/cli-utils release --publish npm | ||
- uses: c-hive/gha-yarn-cache@v1 | ||
- run: yarn install --frozen-lockfile | ||
|
||
- uses: dhis2/action-semantic-release@master | ||
with: | ||
publish-npm: true | ||
publish-github: true | ||
github-token: ${{ env.GH_TOKEN }} | ||
npm-token: ${{ env.NPM_TOKEN }} |
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.