diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index e151b32..0fe5494 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -1,5 +1,3 @@ ---- - # `dist/index.js` is a special file in Actions. # When you reference an action with `uses:` in a workflow, # `index.js` is the code that will run. diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 607bd36..ea736e8 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,5 +1,3 @@ ---- - # For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # diff --git a/.github/workflows/development-freeze.yml b/.github/workflows/development-freeze.yml index c058dac..1d18ecb 100644 --- a/.github/workflows/development-freeze.yml +++ b/.github/workflows/development-freeze.yml @@ -1,5 +1,3 @@ ---- - name: Development Freeze on: @@ -8,10 +6,6 @@ on: types: - completed -env: - PULL_REQUEST_METADATA_DIR: pull_request - PULL_REQUEST_METADATA_FILE: metadata - permissions: contents: read @@ -23,50 +17,28 @@ jobs: runs-on: ubuntu-latest permissions: - issues: write + # Needed for commenting on Pull Requests pull-requests: write steps: - - name: Download Pull Request Metadata artifact - uses: actions/github-script@v6 - with: - script: | - var artifacts = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{ github.event.workflow_run.id }}, - }); - var matchArtifact = artifacts.data.artifacts.filter((artifact) => { - return artifact.name == "${{ env.PULL_REQUEST_METADATA_FILE }}" - })[0]; - var download = await github.rest.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - const fs = require('fs'); - fs.writeFileSync('${{ github.workspace }}/${{ env.PULL_REQUEST_METADATA_FILE }}.zip', Buffer.from(download.data)); - - run: unzip ${{ env.PULL_REQUEST_METADATA_FILE }}.zip - - - name: 'Get Pull Request number' - uses: actions/github-script@v6 + - id: Artifact + name: Download Pull Request Metadata artifact + uses: redhat-plumbers-in-action/download-artifact@v1 with: - script: | - const fs = require('fs'); - const pr_number = Number(fs.readFileSync('./${{ env.PULL_REQUEST_METADATA_FILE }}')); - core.exportVariable('pr_number', pr_number); - github-token: ${{ secrets.GITHUB_TOKEN }} + name: Pull Request Metadata - name: Repository checkout uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Development Freezer + uses: redhat-plumbers-in-action/devel-freezer@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Development Freezer uses: ./ with: - pr-number: ${{ env.pr_number }} + pr-number: ${{ fromJSON(steps.Artifact.outputs.pr-metadata-json).number }} token: ${{ secrets.GITHUB_TOKEN }} - -... diff --git a/.github/workflows/gather-pr-metadata.yml b/.github/workflows/gather-pr-metadata.yml index 705041a..e2fdb9f 100644 --- a/.github/workflows/gather-pr-metadata.yml +++ b/.github/workflows/gather-pr-metadata.yml @@ -1,5 +1,3 @@ ---- - name: Gather Pull Request Metadata on: @@ -34,5 +32,3 @@ jobs: name: ${{ env.PULL_REQUEST_METADATA_FILE }} path: ${{ env.PULL_REQUEST_METADATA_DIR }} retention-days: 1 - -... diff --git a/.github/workflows/issue-labeler.yml b/.github/workflows/issue-labeler.yml index 39ce419..13c9b42 100644 --- a/.github/workflows/issue-labeler.yml +++ b/.github/workflows/issue-labeler.yml @@ -1,5 +1,3 @@ ---- - name: Issue labeler on: issues: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a8674e4..9c23343 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,3 @@ ---- - name: Linting suite on: @@ -37,6 +35,3 @@ jobs: - name: ESLint run: yarn run lint - - # - name: Run CSpell - # run: yarn run lint:spellcheck diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index b6bccb8..492f457 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -1,5 +1,3 @@ ---- - name: GitHub Tag Update on: diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index a97016d..d24bce8 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -1,5 +1,3 @@ ---- - name: Release Drafter on: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 891732a..fdc05c9 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -1,5 +1,3 @@ ---- - name: Unit tests on: @@ -17,17 +15,13 @@ jobs: name: Unit Tests - Node.js runs-on: ubuntu-latest - strategy: - matrix: - node-version: [ 18.x, 20.x ] - steps: - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }} + node-version: 20 cache: yarn cache-dependency-path: yarn.lock @@ -44,5 +38,6 @@ jobs: run: yarn test - name: Codecov - if: ${{ matrix.node-version == '20.x' }} - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }}