From bb6707d0adbeea611c1d73b82b33fc2cbbffe43c Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 28 May 2024 14:39:13 +0100 Subject: [PATCH] chore: upgrade github action versions --- .github/workflows/lint.yml | 34 +++++------ .github/workflows/release.yml | 80 +++++++++++++------------- .github/workflows/test.yml | 104 +++++++++++++++++----------------- 3 files changed, 109 insertions(+), 109 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a13d66b..274cde0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,17 +1,17 @@ -name: test -on: - push: - pull_request: - -jobs: - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - uses: denoland/setup-deno@v1 - with: - deno-version: 1.x - - name: Lint Package with Biome - run: deno task lint \ No newline at end of file +name: test +on: + push: + pull_request: + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - uses: denoland/setup-deno@v1 + with: + deno-version: 1.x + - name: Lint Package with Biome + run: deno task lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 61ada4a..888194c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,40 +1,40 @@ -name: Release - -on: - push: - tags: - - "*" - workflow_dispatch: - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -jobs: - release: - name: Release - runs-on: ubuntu-latest - permissions: - id-token: write - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - uses: denoland/setup-deno@v1 - with: - deno-version: "1.x" - - name: Get tag version - if: startsWith(github.ref, 'refs/tags/') - id: get_tag_version - run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT - - uses: actions/setup-node@v3 - with: - node-version: "20" - registry-url: 'https://registry.npmjs.org' - - uses: pnpm/action-setup@v2 - with: - version: latest - - name: npm build - run: deno task npm ${{steps.get_tag_version.outputs.TAG_VERSION}} - - name: npm publish - if: startsWith(github.ref, 'refs/tags/') - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: cd npm && npm publish --provenance +name: Release + +on: + push: + tags: + - "*" + workflow_dispatch: + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release: + name: Release + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - uses: denoland/setup-deno@v1 + with: + deno-version: "1.x" + - name: Get tag version + if: startsWith(github.ref, 'refs/tags/') + id: get_tag_version + run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT + - uses: actions/setup-node@v4 + with: + node-version: "20" + registry-url: "https://registry.npmjs.org" + - uses: pnpm/action-setup@v4 + with: + version: latest + - name: npm build + run: deno task npm ${{steps.get_tag_version.outputs.TAG_VERSION}} + - name: npm publish + if: startsWith(github.ref, 'refs/tags/') + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: cd npm && npm publish --provenance diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fc3be1d..0852436 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,52 +1,52 @@ -name: test -on: - push: - pull_request: - -jobs: - test-deno: - runs-on: ubuntu-latest - strategy: - matrix: - deno: ["1.x"] - name: Test Deno on Version ${{ matrix.deno }} - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - uses: denoland/setup-deno@v1 - with: - deno-version: ${{ matrix.deno }} - - name: Run tests in Deno - run: deno test -A - test-node: - runs-on: ubuntu-latest - strategy: - matrix: - deno: ["1.x"] - node: ["20", "21"] - name: Test Node on Version ${{ matrix.node }} - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - uses: denoland/setup-deno@v1 - with: - deno-version: ${{ matrix.deno }} - - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node }} - - uses: pnpm/action-setup@v2 - with: - version: latest - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - name: Build and test node - run: deno task npm 0.0.0 \ No newline at end of file +name: test +on: + push: + pull_request: + +jobs: + test-deno: + runs-on: ubuntu-latest + strategy: + matrix: + deno: ["1.x"] + name: Test Deno on Version ${{ matrix.deno }} + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - uses: denoland/setup-deno@v1 + with: + deno-version: ${{ matrix.deno }} + - name: Run tests in Deno + run: deno test -A + test-node: + runs-on: ubuntu-latest + strategy: + matrix: + deno: ["1.x"] + node: ["20", "21"] + name: Test Node on Version ${{ matrix.node }} + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - uses: denoland/setup-deno@v1 + with: + deno-version: ${{ matrix.deno }} + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + - uses: pnpm/action-setup@v4 + with: + version: latest + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + - uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - name: Build and test node + run: deno task npm 0.0.0