chore: Update runner image in ci.yml #88
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: CI | |
on: | |
push: | |
branches: | |
- '**' | |
tags: | |
- 'v*' | |
pull_request: | |
env: | |
NODE_VERSION: 14.18.2 | |
jobs: | |
check-types: | |
name: Check Types | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup Node | |
uses: actions/setup-node@v1.4.4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install Dependencies | |
run: yarn | |
- name: Check Types | |
run: yarn ts | |
lint: | |
name: Run Linter | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup Node | |
uses: actions/setup-node@v1.4.4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install Dependencies | |
run: yarn | |
- name: Check Types | |
run: yarn lint | |
tests: | |
name: Run Tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup Node | |
uses: actions/setup-node@v1.4.4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install Dependencies | |
run: yarn | |
- name: Run Tests | |
run: yarn test:ci | |
create_release: | |
name: Create Release | |
if: success() && startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-22.04 | |
needs: [check-types, lint, tests] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup Node | |
uses: actions/setup-node@v1.4.4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install Dependencies | |
run: yarn | |
- name: Pack Plugin | |
run: npm pack | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: false | |
files: | | |
axios-better-stacktrace-*.tgz | |
publish: | |
name: Publish Release | |
runs-on: ubuntu-22.04 | |
needs: [create_release] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup Node | |
uses: actions/setup-node@v1.4.4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install Dependencies | |
run: yarn | |
- name: Configure NPM | |
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
- name: Publish | |
run: npm publish --access public |