deno_ast 0.13.0

Source text parsing, lexing, and AST related functionality for Deno
Documentation
name: ci

on:
  pull_request:
    branches: [main]
  push:
    branches: [main]

jobs:
  rust:
    name: deno_ast-ubuntu-latest-release
    if: |

      github.event_name == 'push' ||
      !startsWith(github.event.pull_request.head.label, 'denoland:')
    runs-on: ubuntu-latest
    timeout-minutes: 30

    env:
      CARGO_INCREMENTAL: 0
      GH_ACTIONS: 1
      RUST_BACKTRACE: full
      RUSTFLAGS: -D warnings

    steps:
      - name: Clone repository
        uses: actions/checkout@v2

      - uses: denoland/setup-deno@v1
      - uses: dtolnay/rust-toolchain@stable

      - name: Cache
        uses: Swatinem/rust-cache@v1

      - name: Format
        run: |

          cargo fmt --all -- --check
          deno fmt --check

      - name: Lint
        run: |

          cargo clippy --all-targets --all-features --release
          deno lint

      - name: Build
        run: cargo build --all-targets --all-features --release
      - name: Test
        run: cargo test --all-targets --all-features --release

      - name: Publish on version change
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
        if: |

          github.repository == 'denoland/deno_ast' &&
          github.ref == 'refs/heads/main'
        run: deno run -A --no-check https://raw.githubusercontent.com/denoland/automation/0.7.1/tasks/release_on_crate_version_change.ts --publish