From 5e56adab0682fdc446da3b54e688298bd164bdf7 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Wed, 18 Sep 2024 00:05:21 -0500 Subject: [PATCH] =?UTF-8?q?Revert=20"=F0=9F=91=B7=20remove=20special=20cha?= =?UTF-8?q?racters=20from=20release=20tags."?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 33cc980fd826a532a1c3fcbfb78859f0479f374e. --- .changes/config.json | 4 ++-- .github/workflows/release.yml | 4 ++-- tasks/context-from-git-tag.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.changes/config.json b/.changes/config.json index 1109f32a..2836c3a2 100644 --- a/.changes/config.json +++ b/.changes/config.json @@ -3,9 +3,9 @@ "pkgManagers": { "javascript": { "version": true, - "getPublishedVersion": "git tag -l \"${ pkg.pkg.replace(`@interactors/`,`interactors-`) }-v${ pkgFile.version }\" | sed 's/.*-v//'", + "getPublishedVersion": "git tag -l \"${ pkg.pkg }-v${ pkgFile.version }\" | sed 's/.*-v//'", "publish": [ - "git tag -a -m '${ pkg.pkg }-v${ pkgFile.version}' ${ pkg.pkg.replace(`@interactors/`,`interactors-`) }-v${ pkgFile.version }" + "git tag -a -m \"${ pkg.pkg }-v${ pkgFile.version }\" ${ pkg.pkg }-v${ pkgFile.version }" ] } }, diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 358073bd..fcac1003 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,15 +3,15 @@ name: Publish on: push: tags: - - "interactors-*" + - "@interactors/*-v*" permissions: id-token: write contents: read - jobs: publish-to-npm: + if: startsWith(github.ref, 'refs/tags/@interactors') name: NPM ${{ github.ref }} runs-on: ubuntu-latest steps: diff --git a/tasks/context-from-git-tag.ts b/tasks/context-from-git-tag.ts index 85656e1a..da62cb67 100644 --- a/tasks/context-from-git-tag.ts +++ b/tasks/context-from-git-tag.ts @@ -14,7 +14,7 @@ export async function deriveFromGitTag([argName, gitTag]: [ const { default: covectorConfig } = await import("../.changes/config.json", { with: { type: "json" }, }); - const [pkg, _] = gitTag.replace("refs/tags/interactors-", "@interactors/").split("-v"); + const [pkg, _] = gitTag.replace("refs/tags/", "").split("-v"); // @ts-expect-error let's undefined check const pkgConfig = covectorConfig.packages[pkg]; if (!pkgConfig) throw new Error(`${pkg} not defined in .changes/config.json`);