Skip to content

Commit

Permalink
chore(ci): update release workflow and add test build
Browse files Browse the repository at this point in the history
- Remove deno.lock before caching dependencies and building
  * Ensures fresh dependencies are cached/used
  * Prevents potential issues with stale lockfile
- Add new test-build workflow
  * Runs on pushes/PRs to main/master branches
  * Tests building the project before merging changes
  • Loading branch information
sidedwards committed Oct 23, 2024
1 parent 59ecdf8 commit aae317f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ jobs:
with:
deno-version: "1.37.0" # Specify a compatible version

# Remove lockfile and cache dependencies
- name: Build Executables
run: |
rm -f deno.lock # Remove existing lockfile
deno cache main.ts # Cache dependencies first
deno task build
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test Build

on:
# Runs on pushes to main/master
push:
branches: [ main, master ]
# Optionally, also run on pull requests to main/master
pull_request:
branches: [ main, master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: "1.37.0"

- name: Test Build
run: |
rm -f deno.lock
deno cache main.ts
deno task build

0 comments on commit aae317f

Please sign in to comment.