Skip to content

Commit

Permalink
Debug release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shBLOCK committed May 9, 2024
1 parent 9b13ff0 commit 40c232d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,20 @@ jobs:

- name: Validate Tag
uses: actions/github-script@v7
env:
TAG_NAME: ${{ steps.determine_tag.outputs.tag }}
with:
debug: true
# noinspection TypeScriptUnresolvedReference
script: |
console.log(JSON.stringify(context))
const tag_validator = new RegExp("v\d(?:\.\d)+")
const version_pattern = new RegExp("version\s*=\s*\"(?<version>[^\"]+])\"")
const tag = ""
if (tag[0] != "v") {
core.setFailed("Invalid version tag: must be \"v*.*.*\".")
const tag = process.env.TAG_NAME
core.info(`Tag: ${tag}`)
if (!tag.match(tag_validator)) {
core.setFailed(`Invalid version tag: must match "${tag_validator}".`)
return
}
const fs = require("node:fs")
const readline = require("node:readline")
for await (const line of readline.createInterface({
Expand All @@ -108,6 +111,7 @@ jobs:
return
}
}
core.info("Tag matches with module version from pyproject.toml")
codegen:
name: Codegen
Expand Down

0 comments on commit 40c232d

Please sign in to comment.