diff --git a/.github/workflows/dhis2-verify-app.yml b/.github/workflows/dhis2-verify-app.yml new file mode 100644 index 00000000..6f05d129 --- /dev/null +++ b/.github/workflows/dhis2-verify-app.yml @@ -0,0 +1,100 @@ +name: 'dhis2: verify (app)' + +on: + push: + branches: + +env: + GIT_AUTHOR_NAME: '@dhis2-bot' + GIT_AUTHOR_EMAIL: 'apps@dhis2.org' + GIT_COMMITTER_NAME: '@dhis2-bot' + GIT_COMMITTER_EMAIL: 'apps@dhis2.org' + GH_TOKEN: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}} + CI: 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') }} + + - name: Build + run: yarn build + + - uses: actions/upload-artifact@v2 + with: + name: app-build + path: | + **/build + !**/node_modules + retention-days: 1 + + publish: + runs-on: ubuntu-latest + needs: [build] + if: "!contains(github.event.head_commit.message, '[skip ci]')" + steps: + - uses: actions/checkout@v2 + with: + token: ${{env.GH_TOKEN}} + + - uses: actions/setup-node@v1 + with: + node-version: 12.x + + - uses: actions/download-artifact@v2 + with: + name: app-build + + - uses: dhis2/deploy-build@master + with: + build-dir: build + github-token: ${{ env.GH_TOKEN }} + repo-name: event-charts-app + + release: + runs-on: ubuntu-latest + needs: [publish] + if: "github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]')" + steps: + - uses: actions/checkout@v2 + with: + token: ${{env.GH_TOKEN}} + + - uses: actions/setup-node@v1 + with: + node-version: 12.x + + - name: Publish release to GitHub + run: npx @dhis2/cli-utils release diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 747d5ed6..00000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -node_js: -- '8' -before_script: -- npm install --global @dhis2/deploy-build -script: -- npm run build -deploy: -- provider: script - script: deploy-build - skip_cleanup: true - on: - all_branches: true -cache: - yarn: true - directories: - - node_modules -env: - global: - secure: VIhKQbEhZQmmHQYEcx2g9F+cJO0nwCrpEX4KoryS8kSRn+diSFzACrJpcTLXV8QnjUvrkxIOWXhGLFzmUvt0owxt6f8XSBL7gPAb2PdymJR1gupM/8Lb9SKuy6658og0qo2n1EXkjpWuvFHzTNhfCsalAqLlvqHuzt/GUDvLTg4S/SSizWhSei+BhVVPIYIjxeWvc1fig1QQeCCVC/zJBB3SPQ5gIMWtpRv/C9R73oly80LO2bSagj3C7QdYILNR3/XkkH283+SDmtJX8HsjUNWHS6TZXj9Gfq3lcFsq1bpxiTP+WcaBhhpmbAI4mdQY0LPtcuDId+N81Qo0gdwjKaW/FdmGyuEWYwTJ1TPxQU2aVtfRDZ2Xe9Gl9if2ISjuedYG5/lggf3O3GskB4kNibILU7/QhDcRqFWoryImUMnV+ojEGGqohdvIpunj1FCraYPJj5sXcX7rO0uZsc4Mxnx8BzClvSctOcest/3P0z/elJ+qCjYyyjKlJbPpi4dZrIf5WQOBE8rKycHQgeaRr8lTPCDEycKuefRzNIPhuQYtYbcQYfyVVFBqoIlrzNkVVy/idKsA/yCBb7T7hn5WQggyk6q7gKDVTz8Lxmsb2Tl/iI3qTsTNm1sQn690R8XUFu8NHCt/BCGVdglZKePFccaokQMsrnQcyvpHD9PcDig= -notifications: - slack: - secure: eLSjfRc1IGE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