Skip to content

Add CI/CD workflows and first test #4

Add CI/CD workflows and first test

Add CI/CD workflows and first test #4

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@v2
- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Run Tests
run: deno -A test
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]
runs-on: ${{ matrix.os }}
needs:
- test
steps:
- name: Checkout
uses: actions/checkout@v2
- 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:
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 }}