chore(deps): update actions/checkout action to v4 #134
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deno Check | |
on: | |
push: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Pick deno version | |
uses: ./.github/actions/get-asdf-tool-version | |
id: deno-version | |
with: | |
dir_path: . | |
tool_name: deno | |
- name: Set up Deno | |
uses: denoland/setup-deno@61fe2df320078202e33d7d5ad347e7dcfa0e8f31 # v1.1.2 | |
with: | |
deno-version: "${{ steps.deno-version.outputs.version }}" | |
- name: Pick nodejs version | |
uses: ./.github/actions/get-asdf-tool-version | |
id: nodejs-version | |
with: | |
dir_path: . | |
tool_name: nodejs | |
- name: Set up Node.js | |
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 | |
with: | |
node-version: "${{ steps.nodejs-version.outputs.version }}" | |
registry-url: "https://registry.npmjs.org" | |
- name: Check generated | |
run: deno task run-for-test && test -z "$(git status -s)" | |
- name: Check | |
run: deno task check | |
- name: Build:npm | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
run: deno task build:npm | |
# for publish | |
- name: Get tag version | |
if: startsWith(github.ref, 'refs/tags/') | |
id: get_tag | |
run: echo TAG_VERSION="${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT" | |
- name: Build:npm | |
if: startsWith(github.ref, 'refs/tags/') | |
run: deno task build:npm ${{ steps.get_tag.outputs.TAG_VERSION }} | |
- name: npm publish | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_FOR_PUBLISH }} | |
run: cd npm && npm publish |