Skip to content

1.0.0-beta.1

1.0.0-beta.1 #1

Workflow file for this run

name: release-npm
on:
release:
types: [published]
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
deno: [v1.x]
node: [18.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno }}
- name: Cache node_modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v2.0.1
with:
version: 6.23.6
run_install: |
- recursive: true
args: [--frozen-lockfile, --prefer-offline, --ignore-scripts]
- name: Get tag version
if: startsWith(github.ref, 'refs/tags/')
id: get_tag_version
run: echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//}
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'
- name: build
run: deno run -A ./_tools/build_npm.ts ${{steps.get_tag_version.outputs.TAG_VERSION}}
- name: publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: deno run -A ./_tools/publish_npm.ts ${{steps.get_tag_version.outputs.TAG_VERSION}}