diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index ecdc75f..15049a5 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -8,15 +8,43 @@ on: types: [published] jobs: + lint: + name: Lint + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install dependencies + run: npm ci + - name: Run lint + run: npm run test:lint + + check-types: + name: Check types + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install dependencies + run: npm ci + - name: Run types tests + run: npm run test:types + publish-npm: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 + needs: [lint, check-types] steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 16 registry-url: https://registry.npmjs.org/ - run: | + npm install -g npm@9 npm ci npm run build npm publish diff --git a/.github/workflows/push_dev.workflow.yml b/.github/workflows/push_dev.workflow.yml new file mode 100644 index 0000000..3a2d957 --- /dev/null +++ b/.github/workflows/push_dev.workflow.yml @@ -0,0 +1,33 @@ +name: Push to dev branch + +on: + push: + branches: + - "[0-9]+-dev" + +jobs: + lint: + name: Lint + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install dependencies + run: npm ci + - name: Run lint + run: npm run test:lint + + check-types: + name: Check types + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install dependencies + run: npm ci + - name: Run types tests + run: npm run test:types