diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0cba4be..ee93994 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,11 +19,19 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run build --if-present - - run: npm test + + - name: Install dependencies + run: npm ci + + - name: Run build + run: npm run build + + - name: Run test + run: npm test diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 0c9cebc..3795e82 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -8,19 +8,15 @@ permissions: jobs: dependabot-auto-merge: runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' }} - steps: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v1.1.1 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Enable auto-merge for Dependabot PRs - if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' }} run: gh pr merge --auto --merge "$PR_URL" env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7aa531b..fc6857c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,13 +1,11 @@ +name: Release + on: pull_request: branches: - main types: - closed - workflow_run: - workflows: [Bump Patch Version] - types: - - completed jobs: publish: @@ -16,12 +14,21 @@ jobs: github.event_name == 'workflow_run' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 with: node-version: "18" - - run: npm ci - - run: npm run build - - uses: JS-DevTools/npm-publish@v2 + + - name: Install dependencies + run: npm ci + + - name: Build project + run: npm run build + + - name: Publish to npm + uses: JS-DevTools/npm-publish@v2 with: token: ${{ secrets.NPM_TOKEN }}