diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index d624a93..e2d9e48 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -20,12 +20,13 @@ jobs: id: version with: script: | - const semver = context.ref.replace('refs/tags/v', '') + const tag = ${{ github.event.release.tag_name }}; + const semver = tag.replace('v', ''); if (semver.match(/^[0-9]+\.[0-9]+\.[0-9]+$/)) { return semver } - throw new Error('not semver') + throw new Error('Invalid tag: ' + tag); result-encoding: string - run: npm ci