diff --git a/.github/workflows/bump.yaml b/.github/workflows/bump.yaml new file mode 100644 index 0000000..7e6f642 --- /dev/null +++ b/.github/workflows/bump.yaml @@ -0,0 +1,42 @@ +--- +name: Bump + +on: + schedule: + - cron: "0 15 * * *" # every day at 9 in the morning CST + workflow_dispatch: + push: + paths: + - .github/workflows/bump.yaml + branches: + - main + +permissions: + contents: read # Needed to clone the repository + +defaults: + run: + shell: bash + +env: + CI: true + +jobs: + bump: + name: Bump dependencies + runs-on: ubuntu-latest + + permissions: + contents: write # Needed to write bump branches + pull-requests: write # Needed to write bump PRs + + steps: + - name: ๐Ÿ“š Git checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + submodules: recursive + clean: true + persist-credentials: false + set-safe-directory: true + - name: ๐Ÿฃ Bump dependencies + uses: hasundue/molt-action@2042116c4f16e14c08c98130f1470c19c5cbfd2f # v1.0.2 diff --git a/.github/workflows/deno.yaml b/.github/workflows/deno.yaml new file mode 100644 index 0000000..d177d7b --- /dev/null +++ b/.github/workflows/deno.yaml @@ -0,0 +1,58 @@ +--- +name: Build +# This workflow will install Deno then run `deno fmt`, `deno lint`, and `deno test`. +# For more information see: https://github.com/denoland/setup-deno + +on: + push: + branches: + - main + pull_request: + types: + - opened + - synchronize + - reopened + merge_group: + schedule: + - cron: "0 14 * * 1" # every monday at 9 in the morning CST + workflow_dispatch: + +permissions: + contents: read # Needed to clone the repository + +defaults: + run: + shell: bash + +env: + CI: true + DENO_VERSION: v2.0.6 + +jobs: + check: + name: CI + runs-on: ubuntu-latest + + permissions: + pull-requests: write # Needed for Biome comments. + + steps: + - name: ๐Ÿ“š Git checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + submodules: recursive + clean: true + persist-credentials: false + set-safe-directory: true + - name: ๐Ÿฆ• Install Deno + uses: denoland/setup-deno@041b854f97b325bd60e53e9dc2de9cb9f9ac0cba # v1.1.4 + with: + deno-version: ${{ env.DENO_VERSION }} + - name: ๐Ÿ“ฆ Cache dependencies + run: deno install --allow-scripts + - name: ๐Ÿ•ต๏ธ Run linter & verify formatting + run: deno task ci + - name: ๐Ÿ•ต๏ธ Typecheck + run: deno task typecheck + - name: ๐Ÿงช Run tests + run: deno task test diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..540ff0a --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,45 @@ +--- +name: Publish + +on: + workflow_dispatch: + inputs: + package: + type: string + description: The directory the package is located in. + required: true + +permissions: + contents: read + +defaults: + run: + shell: bash + +env: + CI: true + DENO_VERSION: v2.0.6 + +jobs: + publish: + name: Release + runs-on: ubuntu-latest + + permissions: + id-token: write # Needed for auth with JSR. + + steps: + - name: ๐Ÿ“š Git checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + submodules: recursive + clean: true + persist-credentials: false + set-safe-directory: true + - name: ๐Ÿฆ• Install Deno + uses: denoland/setup-deno@041b854f97b325bd60e53e9dc2de9cb9f9ac0cba # v1.1.4 + with: + deno-version: ${{ env.DENO_VERSION }} + - name: ๐Ÿ—ž๏ธ Publish package + run: deno publish + working-directory: packages/${{ inputs.package }}