Skip to content

Commit

Permalink
refactor: remove generated JS from repo (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret authored Aug 23, 2024
1 parent 3e309d0 commit 547a439
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 12,427 deletions.
61 changes: 39 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ name: ci
on: [push, pull_request]

jobs:
deno:
rust:
name: deno_cache_dir-${{ matrix.os }}
if: |
github.event_name == 'push' ||
!startsWith(github.event.pull_request.head.label, 'denoland:')
runs-on: ${{ matrix.os }}
permissions:
contents: read
id-token: write
timeout-minutes: 30
strategy:
matrix:
Expand All @@ -28,27 +25,16 @@ jobs:
with:
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: 1.x

- name: Format
if: contains(matrix.os, 'ubuntu')
run: |
deno fmt --check
cargo fmt --check
run: cargo fmt --check

- name: Lint
- name: Clippy
if: contains(matrix.os, 'ubuntu')
run: |
deno lint
cargo clippy
run: cargo clippy

- name: Test
run: |
deno task test
cargo test
run: cargo test

- name: Cargo publish
if: |
Expand All @@ -59,7 +45,38 @@ jobs:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish -p deno_cache_dir

deno:
name: deno_cache_dir-deno
if: |
github.event_name == 'push' ||
!startsWith(github.event.pull_request.head.label, 'denoland:')
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
timeout-minutes: 30

steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Install rust
uses: dsherret/rust-toolchain-file@v1
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: canary

- name: Format
run: deno fmt --check
- name: Build
run: deno task build
- name: Lint
run: deno lint
- name: Test
run: deno task test

- name: Publish JSR
if: contains(matrix.os, 'ubuntu')
run: |
deno run -A jsr:@david/[email protected]
run: deno run -A jsr:@david/[email protected]
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
token: ${{ secrets.DENOBOT_PAT }}

- uses: denoland/setup-deno@v1
with:
deno-version: canary
- uses: dsherret/rust-toolchain-file@v1

- name: Tag and release
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.vscode
/target
lib/deno_cache_dir.generated.js
3 changes: 2 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"exclude": [
"Cargo.lock",
"rs_lib",
"**/*.toml"
"**/*.toml",
"!lib/deno_cache_dir.generated.js"
]
},
"exclude": [
Expand Down
Loading

0 comments on commit 547a439

Please sign in to comment.