diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index dee9fab..c27bc0c 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -5,19 +5,24 @@ on: [pull_request] permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: preview: runs-on: ubuntu-latest timeout-minutes: 10 steps: - name: checkout - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 submodules: true + persist-credentials: false - name: setup deno - uses: denoland/setup-deno@v2 + uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4 with: deno-version: v2.x @@ -26,16 +31,17 @@ jobs: - name: Get Version id: vars - run: echo ::set-output name=version::$(git describe --abbrev=0 --tags | sed 's/^v//')-pr+$(git rev-parse HEAD) + run: echo "version=$(git describe --abbrev=0 --tags | sed 's/^v//')-pr+$(git rev-parse HEAD)" >> $GITHUB_OUTPUT - name: Setup Node - uses: actions/setup-node@v4 + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: - node-version: 20.x - registry-url: https://registry.npmjs.com + node-version: 24 - name: Build NPM - run: deno task build:npm ${{steps.vars.outputs.version}} + run: deno task build:npm ${STEPS_VARS_OUTPUTS_VERSION} + env: + STEPS_VARS_OUTPUTS_VERSION: ${{steps.vars.outputs.version}} - name: Publish Preview Versions run: npx pkg-pr-new publish './build/npm'