Skip to content

Add CI/CD workflows and first test #7

Add CI/CD workflows and first test

Add CI/CD workflows and first test #7

name: Build and Release
on:
push:
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Run Tests
run: deno test -A
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]
runs-on: ${{ matrix.os }}
needs:
- test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Build
run: deno task compile
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}.drenv
path: builds/*
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
steps:
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: build/*
token: ${{ secrets.GITHUB_TOKEN }}