ci: update issue labeler #244
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: Continuous Integration | |
on: | |
push: | |
branches: main | |
pull_request: | |
branches: main | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v2 | |
- run: deno task lint | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
strategy: | |
fail-fast: false | |
matrix: | |
runtime: | |
- deno | |
- node | |
- bun | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v2 | |
- uses: actions/setup-node@v4 | |
if: matrix.runtime == 'node' | |
with: | |
node-version: 22.x | |
- run: npm ci | |
if: matrix.runtime == 'node' | |
- uses: oven-sh/setup-bun@v2 | |
if: matrix.runtime == 'bun' | |
- run: bun install | |
if: matrix.runtime == 'bun' | |
- run: deno task test:${{ matrix.runtime }} | |
preview: | |
name: Deploy | |
runs-on: ubuntu-latest | |
needs: | |
- lint | |
- test | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v2 | |
- name: Run deno task ci:setup-deno-deploy | |
run: deno task ci:setup-deno-deploy | |
id: setup_github_actions | |
- run: deno install | |
- uses: denoland/deployctl@v1 | |
with: | |
project: ${{ steps.setup_github_actions.outputs.project }} | |
entrypoint: ${{ steps.setup_github_actions.outputs.entrypoint }} | |
import-map: ${{ steps.setup_github_actions.outputs.import_map }} | |
include: ${{ steps.setup_github_actions.outputs.include }} | |
exclude: ${{ steps.setup_github_actions.outputs.exclude }} | |
autogenerate: | |
name: Autogenerate | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
runs-on: ubuntu-latest | |
needs: | |
- lint | |
- test | |
- preview | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v2 | |
- run: deno task ci:autogenerate | |
- name: Run git push | |
run: | | |
if [ -n "$(git status --porcelain)" ]; then | |
git config user.name 'github-actions[bot]' | |
git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
git diff | |
git add . | |
git commit -m 'ci: autogenerated changes' | |
git pull --rebase | |
git push | |
fi | |
publish: | |
name: Publish | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
runs-on: ubuntu-latest | |
needs: | |
- lint | |
- test | |
- preview | |
- autogenerate | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v2 | |
- run: deno publish |