Skip to content

Fix release workflow #21

Fix release workflow

Fix release workflow #21

name: Build and Release
on:
push:
jobs:
test:
strategy:
matrix:
os:
- name: x86_64-pc-windows-msvc
runner: windows-latest
- name: x86_64-apple-darwin
runner: macos-13
- name: aarch64-apple-darwin
runner: macos-latest
- name: x86_64-unknown-linux-gnu
runner: ubuntu-latest
- name: aarch64-unknown-linux-gnu
runner: ubuntu-latest
runs-on: ${{ matrix.os.runner }}
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:
- name: x86_64-pc-windows-msvc
runner: windows-latest
- name: x86_64-apple-darwin
runner: macos-13
- name: aarch64-apple-darwin
runner: macos-latest
- name: x86_64-unknown-linux-gnu
runner: ubuntu-latest
- name: aarch64-unknown-linux-gnu
runner: ubuntu-latest
runs-on: ${{ matrix.os.runner }}
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 compile -A --output=builds/ --target=${{ matrix.os.name }} main.ts
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os.name }}.drenv
path: builds/*
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
needs:
- build
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: builds
- name: List files
run: ls -l builds
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
builds/x86_64-pc-windows-msvc.drenv
builds/x86_64-apple-darwin.drenv
builds/aarch64-apple-darwin.drenv
builds/x86_64-unknown-linux-gnu.drenv
builds/aarch64-unknown-linux-gnu.drenv
fail_on_unmatched_files: true
generate_release_notes: true