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/bump.yml b/.github/workflows/bump.yml index 46bfe3d..0fe4e9d 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -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 diff --git a/.github/workflows/validate.bottles.yml b/.github/workflows/validate.bottles.yml new file mode 100644 index 0000000..2f81c29 --- /dev/null +++ b/.github/workflows/validate.bottles.yml @@ -0,0 +1,35 @@ +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 + + # 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 ./pkgx.rb + - run: pkgx semverator satisfies ^1 1.0.0