Skip to content

🔊Enhanced some logs #34

🔊Enhanced some logs

🔊Enhanced some logs #34

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- "*"
jobs:
setup:
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.set_condition.outputs.should_run }}
steps:
- id: set_condition
run: |
if [[ "${{ github.ref_type }}" == "tag" ]] || [[ "${{ contains(github.event.head_commit.message, '📦️') }}" == "false" ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
fi
check:
runs-on: ubuntu-latest
needs: setup
if: ${{ startsWith(github.ref, 'refs/tags/') || needs.setup.outputs.should_run == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Run checks
run: deno task check
publish-jsr:
runs-on: ubuntu-latest
needs: check
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Publish jsr
run: npx jsr publish
publish-npm:
runs-on: ubuntu-latest
needs: check
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Build npm packages
run: deno task build
- name: Setup Node/npm
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
scope: "@carefree0910"
- name: Publish to npm
run: deno task publish:npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}