Merge pull request #69 from Battosuai/fix/memory-leak-mixin-tracking #44
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
name: ts-mixer CI | |
on: [push] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
registry-url: 'https://registry.npmjs.org' | |
- run: yarn install | |
- run: yarn lint | |
- run: yarn codegen --check | |
test: | |
needs: lint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x, 14.x, 16.x, 18.x] | |
typescript-version: [4.2.x, 4.4.x, 4.6.x, 4.8.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: yarn install --ignore-engines | |
- name: TypeScript ${{ matrix.typescript-version }} | |
run: yarn add-no-save --ignore-engines typescript@${{matrix.typescript-version}} | |
- run: yarn test | |
publish: | |
needs: test | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
registry-url: 'https://registry.npmjs.org' | |
- run: yarn install | |
- run: yarn build | |
- id: prerelease_tag | |
uses: satackey/[email protected] | |
with: | |
script: | | |
const core = require('@actions/core'); | |
const { resolve } = require('path'); | |
const { version } = require(resolve(process.env.GITHUB_WORKSPACE, 'package.json')); | |
const prereleaseTagMatch = /[0-9]+\.[0-9]+\.[0-9]+-([a-z]+)\.[0-9]+/.exec(version); | |
if (prereleaseTagMatch !== null) | |
core.setOutput('npm_tag', prereleaseTagMatch[1]); | |
else | |
core.setOutput('npm_tag', 'latest') | |
- run: npm publish --tag ${{ steps.prerelease_tag.outputs.npm_tag }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_TOKEN }} |