diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4462186..81bbb80 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -97,14 +97,20 @@ jobs: repositories: homebrew-tap - name: Dispatch homebrew-tap formula update + id: dispatch-homebrew if: vars.ENABLE_HOMEBREW_DISPATCH == 'true' - continue-on-error: true env: GH_TOKEN: ${{ steps.app-token.outputs.token }} + RELEASE_VERSION: ${{ github.ref_name }} run: | gh api \ --method POST \ - -H "Accept: application/vnd.github+json" \ /repos/AniTrend/homebrew-tap/dispatches \ - -f event_type='stackctl-release' \ - -f client_payload="{\"version\":\"${{ github.ref_name }}\"}" + --input - < { const cmd = buildCli(); @@ -45,5 +46,5 @@ Deno.test("buildCli produces correct help output smoke test", () => { Deno.test("buildCli version is set", () => { const cmd = buildCli(); - assertEquals(cmd.getVersion(), "0.1.0-dev"); + assertEquals(cmd.getVersion(), VERSION); }); diff --git a/src/version_test.ts b/src/version_test.ts index 5ab4344..9e1c815 100644 --- a/src/version_test.ts +++ b/src/version_test.ts @@ -1,6 +1,6 @@ -import { assertEquals } from "@std/assert"; +import { assertMatch } from "@std/assert"; import { VERSION } from "./version.ts"; -Deno.test("VERSION is dev", () => { - assertEquals(VERSION, "0.1.0-dev"); +Deno.test("VERSION is set and follows semver pattern", () => { + assertMatch(VERSION, /^\d+\.\d+\.\d+(-dev)?$/); });