-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ismay
committed
Jun 11, 2024
1 parent
c8811aa
commit 60aaada
Showing
2 changed files
with
36 additions
and
42 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 |
---|---|---|
|
@@ -5,58 +5,17 @@ concurrency: | |
# Cancel previous runs if not on a release branch | ||
cancel-in-progress: ${{ !contains(github.ref, fromJSON('["master", "main"]')) }} | ||
|
||
env: | ||
GIT_AUTHOR_NAME: '@dhis2-bot' | ||
GIT_AUTHOR_EMAIL: '[email protected]' | ||
GIT_COMMITTER_NAME: '@dhis2-bot' | ||
GIT_COMMITTER_EMAIL: '[email protected]' | ||
D2_VERBOSE: true | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
|
||
lint: | ||
uses: ./.github/workflows/lint.yml | ||
|
||
test: | ||
uses: ./.github/workflows/test.yml | ||
|
||
e2e: | ||
uses: ./.github/workflows/e2e.yml | ||
secrets: inherit | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: [build, lint, test, e2e] | ||
uses: ./.github/workflows/release.yml | ||
if: "!github.event.push.repository.fork && github.actor != 'dependabot[bot]'" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: 'yarn' | ||
|
||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: app-build | ||
|
||
# ensure that d2-app-scripts is available | ||
- run: yarn install --frozen-lockfile | ||
|
||
- uses: dhis2/action-semantic-release@master | ||
with: | ||
publish-apphub: true | ||
publish-github: true | ||
github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} | ||
apphub-token: ${{ secrets.DHIS2_BOT_APPHUB_TOKEN }} | ||
|
||
- uses: dhis2/deploy-build@master | ||
with: | ||
# uncomment following line for monorepo apps: | ||
#cwd: ./packages/app | ||
build-dir: build/app | ||
github-token: ${{ secrets.DHIS2_BOT_GITHUB_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
on: | ||
workflow_call: | ||
secrets: | ||
DHIS2_BOT_GITHUB_TOKEN: | ||
required: true | ||
DHIS2_BOT_APPHUB_TOKEN: | ||
required: true | ||
|
||
env: | ||
GIT_AUTHOR_NAME: '@dhis2-bot' | ||
GIT_AUTHOR_EMAIL: '[email protected]' | ||
GIT_COMMITTER_NAME: '@dhis2-bot' | ||
GIT_COMMITTER_EMAIL: '[email protected]' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'yarn' | ||
- run: yarn install --frozen-lockfile | ||
- run: yarn d2-app-scripts build | ||
- uses: dhis2/action-semantic-release@master | ||
with: | ||
publish-apphub: true | ||
publish-github: true | ||
github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} | ||
apphub-token: ${{ secrets.DHIS2_BOT_APPHUB_TOKEN }} | ||
- uses: dhis2/deploy-build@master | ||
with: | ||
build-dir: build/app | ||
github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} |