|
| 1 | +name: Source Release Debug |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: {} |
| 5 | + |
| 6 | +jobs: |
| 7 | + materials: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + if: ${{ github.repository_owner == 'apache' }} |
| 10 | + |
| 11 | + strategy: |
| 12 | + matrix: |
| 13 | + node-version: [18.x] |
| 14 | + |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + |
| 18 | + - name: Use Node.js ${{ matrix.node-version }} |
| 19 | + uses: actions/setup-node@v4 |
| 20 | + with: |
| 21 | + node-version: ${{ matrix.node-version }} |
| 22 | + |
| 23 | + - name: Prepare env |
| 24 | + run: | |
| 25 | + echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV |
| 26 | +
|
| 27 | + - name: Cache node modules |
| 28 | + uses: actions/cache@v3 |
| 29 | + env: |
| 30 | + cache-name: cache-node-modules |
| 31 | + with: |
| 32 | + # npm cache files are stored in `~/.npm` on Linux/macOS |
| 33 | + path: ~/.npm |
| 34 | + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} |
| 35 | + |
| 36 | + - name: Prepare release materials |
| 37 | + run: | |
| 38 | + npm i |
| 39 | + node build/source-release/prepareReleaseMaterials.js \ |
| 40 | + --rcversion ${{env.RELEASE_VERSION}} \ |
| 41 | + --commit ${{github.sha}} \ |
| 42 | + --repo ${{github.repository}} \ |
| 43 | + --out tmp/materials |
| 44 | +
|
| 45 | + - name: Archive materials |
| 46 | + uses: actions/upload-artifact@v3 |
| 47 | + with: |
| 48 | + name: apache-echarts-${{env.RELEASE_VERSION}}-release-materials |
| 49 | + path: | |
| 50 | + tmp/materials/* |
| 51 | +
|
| 52 | + source: |
| 53 | + runs-on: ubuntu-latest |
| 54 | + needs: materials |
| 55 | + |
| 56 | + strategy: |
| 57 | + matrix: |
| 58 | + node-version: [18.x] |
| 59 | + |
| 60 | + steps: |
| 61 | + - uses: actions/checkout@v4 |
| 62 | + |
| 63 | + - name: Use Node.js ${{ matrix.node-version }} |
| 64 | + uses: actions/setup-node@v4 |
| 65 | + with: |
| 66 | + node-version: ${{ matrix.node-version }} |
| 67 | + |
| 68 | + - name: Prepare env |
| 69 | + run: | |
| 70 | + echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV |
| 71 | +
|
| 72 | + # Get RELEASE_NOTE.txt and pack it into zip. |
| 73 | + - name: Download materials |
| 74 | + uses: actions/download-artifact@v3 |
| 75 | + with: |
| 76 | + name: apache-echarts-${{env.RELEASE_VERSION}}-release-materials |
| 77 | + |
| 78 | + # TODO Check release version is RC |
| 79 | + |
| 80 | + # Archive before run others to avoid packing unknown files. |
| 81 | + - name: Archive source release |
| 82 | + uses: actions/upload-artifact@v3 |
| 83 | + with: |
| 84 | + name: apache-echarts-${{env.RELEASE_VERSION}}-src |
| 85 | + path: | |
| 86 | + index.d.ts |
| 87 | + src/ |
| 88 | + extension-src/ |
| 89 | + ssr/client/src/ |
| 90 | + licenses/ |
| 91 | + theme/ |
| 92 | + build/ |
| 93 | + !build/source-release |
| 94 | + package.json |
| 95 | + package-lock.json |
| 96 | + LICENSE |
| 97 | + NOTICE |
| 98 | + README.md |
| 99 | + tsconfig.json |
| 100 | + test/ut |
| 101 | + test/types |
| 102 | + test/check-build.html |
| 103 | + RELEASE_NOTE.txt |
| 104 | +
|
| 105 | +
|
| 106 | + validate-source: |
| 107 | + runs-on: ubuntu-latest |
| 108 | + needs: source |
| 109 | + |
| 110 | + strategy: |
| 111 | + matrix: |
| 112 | + node-version: [18.x] |
| 113 | + |
| 114 | + steps: |
| 115 | + - name: Use Node.js ${{ matrix.node-version }} |
| 116 | + uses: actions/setup-node@v4 |
| 117 | + with: |
| 118 | + node-version: ${{ matrix.node-version }} |
| 119 | + |
| 120 | + - name: Prepare env |
| 121 | + run: | |
| 122 | + echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV |
| 123 | +
|
| 124 | + - name: Download source release |
| 125 | + uses: actions/download-artifact@v3 |
| 126 | + with: |
| 127 | + name: apache-echarts-${{env.RELEASE_VERSION}}-src |
| 128 | + path: tmp/echarts |
| 129 | + |
| 130 | + - name: Build source release |
| 131 | + run: | |
| 132 | + npm ci |
| 133 | + npx jest --version |
| 134 | + npm run release |
| 135 | + npm run test |
| 136 | + npm run test:dts |
| 137 | + working-directory: tmp/echarts |
0 commit comments