Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .github/workflows/release-native.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Release Native

on:
push:
tags:
- "v*"
workflow_dispatch:

permissions:
contents: write

jobs:
build:
name: Build (${{ matrix.target }})
strategy:
matrix:
include:
- runner: macos-14
target: aarch64-darwin
- runner: ubuntu-24.04
target: x86_64-linux
- runner: ubuntu-24.04-arm
target: aarch64-linux
runs-on: ${{ matrix.runner }}

steps:
- uses: actions/checkout@v4

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v13

- name: Restore Nix store cache
uses: actions/cache@v4
with:
path: /nix/store
key: edge-runtime-${{ matrix.target }}-${{ hashFiles('flake.lock') }}
restore-keys: edge-runtime-${{ matrix.target }}-

- name: Build
run: |
nix build --extra-experimental-features "nix-command flakes" \
--system ${{ matrix.target }}
- name: Package
run: |
TAR="edge-runtime-${{ github.ref_name }}-${{ matrix.target }}.tar.gz"
tar czf "$TAR" \
--dereference \
-C "$(readlink -f ./result)" \
.

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: edge-runtime-${{ matrix.target }}
path: edge-runtime-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
retention-days: 1

release:
name: Create Release
needs: build
runs-on: ubuntu-latest

steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: List files (debug)
run: ls -R artifacts

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
files: artifacts/**/*
93 changes: 93 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
description = "Supabase Edge Runtime";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs @ {
self,
nixpkgs,
flake-utils,
flake-parts
}: flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"aarch64-darwin"
"aarch64-linux"
# TODO: Missing "x86_64-darwin" supabase/rusty_v8
#"x86_64-darwin"
"x86_64-linux"
];

perSystem = { system, pkgs, inputs', ... }:
rec {
packages = {
edge-runtime = pkgs.callPackage ./nix/edge-runtime.nix { };
default = packages.edge-runtime;
};
};
};
}

Loading