ts #231
Workflow file for this run
This file contains hidden or 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
| name: ts | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release/* | |
| - snapshot/* | |
| pull_request: | |
| merge_group: | |
| release: | |
| types: | |
| - published | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' || github.ref_name != 'main' }} | |
| jobs: | |
| lint: | |
| name: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v7 | |
| - uses: perses/github-actions@v0.12.0 | |
| - uses: ./.github/perses-ci/actions/setup_environment | |
| with: | |
| enable_npm: true | |
| nvmrc_path: "./ts/.nvmrc" | |
| - name: install deps | |
| run: cd ./ts && npm ci | |
| - run: cd ./ts && npm run lint | |
| type_check: | |
| name: "type check" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v7 | |
| - uses: perses/github-actions@v0.12.0 | |
| - uses: ./.github/perses-ci/actions/setup_environment | |
| with: | |
| enable_npm: true | |
| nvmrc_path: "./ts/.nvmrc" | |
| - name: install deps | |
| run: cd ./ts && npm ci | |
| - run: cd ./ts && npm run type-check | |
| build: | |
| name: 'build' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v7 | |
| - uses: perses/github-actions@v0.12.0 | |
| - uses: ./.github/perses-ci/actions/setup_environment | |
| with: | |
| enable_npm: true | |
| nvmrc_path: './ts/.nvmrc' | |
| - name: install dependencies | |
| run: cd ./ts && npm ci | |
| - name: build libraries | |
| run: cd ./ts && npm run build | |
| - name: store libraries archives | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: archives | |
| path: | | |
| ts/dist | |
| !ts/node_modules | |
| release: | |
| name: 'release' | |
| needs: 'build' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v7 | |
| - uses: perses/github-actions@v0.12.0 | |
| - uses: ./.github/perses-ci/actions/setup_environment | |
| with: | |
| enable_npm: true | |
| nvmrc_path: './ts/.nvmrc' | |
| - name: Download archive | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: archives | |
| path: ts/dist | |
| - name: Dry run | |
| if: ${{ !github.event.release.tag_name }} | |
| run: cd ts && npm publish --access public --dry-run | |
| - name: Publish npm package | |
| if: ${{ github.event.release.tag_name }} | |
| run: cd ts && npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |