|
| 1 | +on: |
| 2 | + push: |
| 3 | + branches: |
| 4 | + - trunk |
| 5 | + - candidate-3.x.x |
| 6 | + |
| 7 | +permissions: |
| 8 | + contents: write |
| 9 | + pull-requests: write |
| 10 | + |
| 11 | +name: release-please |
| 12 | + |
| 13 | +jobs: |
| 14 | + release-please: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - name: Initialize Release Please |
| 18 | + id: release |
| 19 | + uses: googleapis/release-please-action@v4 |
| 20 | + with: |
| 21 | + target-branch: ${{ github.ref_name }} |
| 22 | + token: ${{ secrets.RELEASE_PLEASE_TOKEN }} |
| 23 | + config-file: release-please-config.json |
| 24 | + manifest-file: .release-please-manifest.json |
| 25 | + |
| 26 | + - name: Checkout Sources |
| 27 | + if: ${{ steps.release.outputs.release_created }} |
| 28 | + uses: actions/checkout@v4 |
| 29 | + |
| 30 | + - name: Install NodeJS |
| 31 | + if: ${{ steps.release.outputs.release_created }} |
| 32 | + uses: actions/setup-node@v4 |
| 33 | + with: |
| 34 | + node-version: 20 |
| 35 | + registry-url: "https://registry.npmjs.org" |
| 36 | + scope: "@hpcc-js" |
| 37 | + |
| 38 | + - name: Install OS Dependencies |
| 39 | + if: ${{ steps.release.outputs.release_created }} |
| 40 | + run: | |
| 41 | + pip install pandas scikit-learn |
| 42 | +
|
| 43 | + - name: Export GitHub Actions cache environment variables |
| 44 | + if: ${{ steps.release.outputs.release_created }} |
| 45 | + uses: actions/github-script@v7 |
| 46 | + with: |
| 47 | + script: | |
| 48 | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); |
| 49 | + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); |
| 50 | +
|
| 51 | + - name: Install Dependencies |
| 52 | + if: ${{ steps.release.outputs.release_created }} |
| 53 | + run: | |
| 54 | + npm ci |
| 55 | +
|
| 56 | + - name: Lint |
| 57 | + if: ${{ steps.release.outputs.release_created }} |
| 58 | + run: | |
| 59 | + npm run lint-all |
| 60 | +
|
| 61 | + - name: Build |
| 62 | + if: ${{ steps.release.outputs.release_created }} |
| 63 | + run: | |
| 64 | + npm run build |
| 65 | +
|
| 66 | + - name: Install Test Dependencies |
| 67 | + if: ${{ steps.release.outputs.release_created }} |
| 68 | + run: | |
| 69 | + sudo apt-get update |
| 70 | + sudo npx -y playwright install chromium --with-deps |
| 71 | + npx -y playwright install chromium |
| 72 | + wget https://github.com/hpcc-systems/HPCC-Platform/releases/download/community_9.6.50-1/hpccsystems-platform-community_9.6.50-1jammy_amd64_withsymbols.deb |
| 73 | +
|
| 74 | + - name: Install HPCC Platform |
| 75 | + if: ${{ steps.release.outputs.release_created }} |
| 76 | + continue-on-error: true |
| 77 | + run: | |
| 78 | + sudo apt install -f ./hpccsystems-platform-community_9.6.50-1jammy_amd64_withsymbols.deb |
| 79 | + sudo /etc/init.d/hpcc-init start |
| 80 | +
|
| 81 | + - name: Test |
| 82 | + if: ${{ steps.release.outputs.release_created }} |
| 83 | + env: |
| 84 | + CI: true |
| 85 | + run: | |
| 86 | + npm run test-local |
| 87 | +
|
| 88 | + # - name: Calculate Coverage |
| 89 | + # if: ${{ steps.release.outputs.release_created }} |
| 90 | + # run: | |
| 91 | + # npm run coverage |
| 92 | + |
| 93 | + # - name: Update Coveralls |
| 94 | + # if: ${{ steps.release.outputs.release_created }} |
| 95 | + # uses: coverallsapp/github-action@v2 |
| 96 | + # with: |
| 97 | + # github-token: ${{ secrets.GITHUB_TOKEN }} |
| 98 | + |
| 99 | + - name: Publish |
| 100 | + if: ${{ steps.release.outputs.release_created }} |
| 101 | + env: |
| 102 | + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |
| 103 | + run: | |
| 104 | + npm run publish |
| 105 | +
|
| 106 | + - name: Purge jsdelivr |
| 107 | + if: ${{ steps.release.outputs.release_created }} |
| 108 | + run: | |
| 109 | + npm run purge-jsdelivr |
| 110 | +
|
| 111 | + - name: Upload error logs |
| 112 | + if: ${{ failure() || cancelled() }} |
| 113 | + uses: actions/upload-artifact@v4 |
| 114 | + with: |
| 115 | + name: all-logs |
| 116 | + path: ./**/*.log |
0 commit comments