From b841621a76eae438b09e1bce5e74549678c24e7f Mon Sep 17 00:00:00 2001 From: Yusuke Tanaka Date: Tue, 12 Sep 2023 15:44:23 +0900 Subject: [PATCH] 1.8.2 (#175) This bumps the version to 1.8.2 and fixes #174. --- .github/workflows/on-release.yml | 21 +++++++++++++++++++++ deno.json | 3 ++- src/version.ts | 2 +- tools/version_match.ts | 11 +++++++++++ 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/on-release.yml create mode 100644 tools/version_match.ts diff --git a/.github/workflows/on-release.yml b/.github/workflows/on-release.yml new file mode 100644 index 00000000..0e04cbe7 --- /dev/null +++ b/.github/workflows/on-release.yml @@ -0,0 +1,21 @@ +name: Check on release + +on: + release: + types: [created] + +jobs: + check-on-release: + runs-on: [ubuntu-latest] + + steps: + - name: Setup repo + uses: actions/checkout@v3 + + - name: Setup Deno + uses: denoland/setup-deno@v1 + + - name: check version match + run: deno task version-match + env: + RELEASE_TAG: ${{ github.event.release.tag_name }} diff --git a/deno.json b/deno.json index 41c7c65a..7a86168c 100644 --- a/deno.json +++ b/deno.json @@ -11,6 +11,7 @@ }, "tasks": { "test": "deno test -A --unstable tests/ src/", - "build-action": "deno bundle ./src/utils/mod.ts > ./action/deps.js" + "build-action": "deno bundle ./src/utils/mod.ts > ./action/deps.js", + "version-match": "deno run --allow-read --allow-env ./tools/version_match.ts" } } diff --git a/src/version.ts b/src/version.ts index d7e403fb..12c36c10 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,3 +1,3 @@ -export const VERSION = "1.8.0"; +export const VERSION = "1.8.2"; export const MINIMUM_DENO_VERSION = "1.28.3"; diff --git a/tools/version_match.ts b/tools/version_match.ts new file mode 100644 index 00000000..85485f86 --- /dev/null +++ b/tools/version_match.ts @@ -0,0 +1,11 @@ +// Copyright 2023 Deno Land Inc. All rights reserved. MIT license. + +// This script ensures that version specifier defined in `src/version.ts` +// matches the released tag version. +// Intended to run when a draft release is created on GitHub. + +import { VERSION } from "../src/version.ts"; +import { assertEquals } from "https://deno.land/std@0.194.0/testing/asserts.ts"; + +const releaseTagVersion = Deno.env.get("RELEASE_TAG")!; +assertEquals(VERSION, releaseTagVersion);