diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index c38528a2..9cfd6075 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -9,20 +9,31 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + + - name: Cache + uses: actions/cache@v3.0.2 + with: + path: node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: ${{ runner.os }}-yarn- + + - name: Use Node.js 16.x + uses: actions/setup-node@v3 with: - node-version: 12 + node-version: 16.x registry-url: https://registry.npmjs.org/ + - uses: little-core-labs/get-git-tag@v3.0.1 id: tagName with: tagRegex: "v(.*)" tagRegexGroup: 1 + - run: yarn install - run: yarn run lerna bootstrap - - run: yarn run lint - run: yarn run build - run: yarn test - - run: yarn run lerna publish ${{ steps.tagName.outputs.tag }} --yes --no-git-tag-version --no-push + - run: yarn run lint + - run: yarn run lerna publish ${{ steps.tagName.outputs.tag }} --yes --no-git-tag-version --no-push --no-verify-access env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/.github/workflows/validatecommit.yml b/.github/workflows/validatecommit.yml index f73bf73d..91398a3b 100644 --- a/.github/workflows/validatecommit.yml +++ b/.github/workflows/validatecommit.yml @@ -13,12 +13,22 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + + - name: Cache + uses: actions/cache@v3.0.2 + with: + path: node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: ${{ runner.os }}-yarn- + + - name: Use Node.js 16.x + uses: actions/setup-node@v3 with: - node-version: 12 + node-version: 16.x registry-url: https://registry.npmjs.org/ + - run: yarn install - run: yarn run lerna bootstrap - - run: yarn run lint - run: yarn run build - run: yarn test + - run: yarn run lint diff --git a/.github/workflows/verifynpm.yml b/.github/workflows/verifynpm.yml new file mode 100644 index 00000000..079a79bb --- /dev/null +++ b/.github/workflows/verifynpm.yml @@ -0,0 +1,24 @@ +name: Verify NPM + +on: + push: + branches: + - ci-debug + +jobs: + validate-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://registry.npmjs.org/ + + - run: npm config list -l + - run: printenv + - name: Ensure access + run: npm whoami + env: + NODE_AUTH_TOKEN: ${{ secrets.npm_token }}