Skip to content

Commit

Permalink
attempt to validate bottles when uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jan 16, 2025
1 parent 484eeba commit 0591903
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/actions/bump.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async function bottle(newVersion: string): Promise<Bottle[]> {
// 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`] })

Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
cancel-in-progress: true

jobs:
bump:
bump-n-bottle:
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -36,24 +36,12 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

- uses: softprops/action-gh-release@v1
- uses: softprops/action-gh-release@v2
with:
name: ${{steps.bump.outputs.name}} v${{ steps.bump.outputs.version }}
tag_name: v${{ steps.bump.outputs.version }}
files: bottles/*
fail_on_unmatched_files: true
make_latest: true
generate_release_notes: true
if: steps.bump.outputs.name

test:
needs: bump
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: Homebrew/actions/setup-homebrew@master
- name: brew install pkgxdev/made/pkgx
run: |
brew install pkgxdev/made/pkgx
pkgx semverator satisfies ^1 1.0.0
32 changes: 32 additions & 0 deletions .github/workflows/validate.bottles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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: # the “dedicated” homebrew setup action doesn't work in containers
- run: |
apt update --yes && apt install --yes build-essential procps curl file git
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
if: matrix.x.container == 'ubuntu:focal'
- uses: Homebrew/actions/setup-homebrew@master
if: matrix.x.container != 'ubuntu:focal'

- run: brew install pkgxdev/made/pkgx
- run: pkgx semverator satisfies ^1 1.0.0

0 comments on commit 0591903

Please sign in to comment.