From e81478e8a6451a614a329cdfc676adf44901fbf9 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 16 Jan 2025 07:40:48 -0500 Subject: [PATCH] attempt to validate bottles when uploaded --- .github/actions/bump.ts | 2 +- .github/workflows/validate.bottles.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/validate.bottles.yml diff --git a/.github/actions/bump.ts b/.github/actions/bump.ts index aa2a776..82d0f9d 100755 --- a/.github/actions/bump.ts +++ b/.github/actions/bump.ts @@ -112,7 +112,7 @@ async function bottle(newVersion: string): Promise { // Save the binary to a file await Deno.writeFile(binaryFileName, uint8Array) - // Build the directory structure + // Build the directory structure const cellarPath = `pkgx/${newVersion}` await run({ cmd: ["mkdir", "-p", `${cellarPath}/bin`] }) diff --git a/.github/workflows/validate.bottles.yml b/.github/workflows/validate.bottles.yml new file mode 100644 index 0000000..14cad3d --- /dev/null +++ b/.github/workflows/validate.bottles.yml @@ -0,0 +1,26 @@ +name: validate bottles + +on: + workflow_dispatch: + release: + types: + - published + - edited + +jobs: + smoke: + runs-on: ${{ matrix.x.os }} + strategy: + matrix: + x: + - os: ubuntu-latest + - os: ubuntu-latest + container: ubuntu:focal + - os: macos-latest + container: ${{ matrix.x.container }} + steps: + - uses: actions/checkout@v4 + - uses: Homebrew/actions/setup-homebrew@master + - run: brew install ./pkgx.rb + - run: brew test pkgx + - run: pkgx semverator satisfies ^1 1.0.0