diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index 0367969..7c6fef5 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -1,9 +1,6 @@ name: Latest -on: - push: - branches: - - master +on: [push] jobs: verify: @@ -15,19 +12,19 @@ jobs: - name: Setup uses: actions/setup-node@v1 with: - node-version: 13.2 + node-version: 14 - name: Cache uses: actions/cache@v1 with: path: node_modules - key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package.json') }} restore-keys: | ${{ runner.OS }}-npm-cache- - name: Install - run: npm ci - # - name: Test - # run: npm t + run: npm i + - name: Test + run: npm run test --if-present - name: Lint - run: npm run lint - # - name: Types - # run: npm run types + run: npm run lint --if-present + - name: Types + run: npm run types --if-present diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0af45df..66de380 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,17 +14,17 @@ jobs: - name: Setup uses: actions/setup-node@v1 with: - node-version: 13.2 + node-version: 14 - name: Cache uses: actions/cache@v1 with: path: node_modules - key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package.json') }} restore-keys: | ${{ runner.OS }}-npm-cache- - name: Verify run: | - npm ci + npm i npm run preversion npm: runs-on: ubuntu-latest @@ -47,4 +47,4 @@ jobs: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc ORG="$(echo '${{ github.repository }}' | cut -d'/' -f1)" echo "registry=https://npm.pkg.github.com/$ORG" > .npmrc - npm publish \ No newline at end of file + npm publish