mirror of
https://github.com/mayurankv/Obsidian-Code-Styler.git
synced 2026-07-22 08:10:29 +00:00
Fix automatic updating
This commit is contained in:
parent
8c3c90b64b
commit
b758c672a4
2 changed files with 5 additions and 2 deletions
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
|
|
@ -27,9 +27,12 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: ${{ github.ref_name }} # tag="${GITHUB_REF#refs/tags/}"
|
||||
run: |
|
||||
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
||||
message=$(git tag -l --format='%(contents:subject)' $tag)
|
||||
|
||||
gh release create "$tag" \
|
||||
--title="$tag" \
|
||||
--notes="${git tag -l --format='%(contents:subject)' $tag}" \
|
||||
--notes="${message}" \
|
||||
--verify-tag \
|
||||
--draft \
|
||||
main.js manifest.json styles.css
|
||||
|
|
|
|||
|
|
@ -22,6 +22,6 @@ process.env.release_notes = /(?<=## \[Unreleased\])[\s\S]*?\n(?=## )/.exec(chang
|
|||
writeFileSync("CHANGELOG.md",changelog.replace(/## \[Unreleased\]/,`## [Unreleased]\n\n## [${newVersion}] - ${new Date().toISOString().slice(0, 10)}`).replace(/(?<=\[Unreleased\]: \/..\/..\/compare\/)(\d+.\d+.\d+)...HEAD/,`${newVersion}...HEAD\n[${newVersion}]: /../../compare/${lastVersion}...${newVersion}`));
|
||||
|
||||
// Push to origin
|
||||
exec(`git add . && git commit -m 'Ready release $npm_package_version' && git push && git tag -a $npm_package_version -F- <<EOF && git push origin $npm_package_version && git push origin $npm_package_version
|
||||
exec(`git add . && git commit -m 'Ready release ${newVersion}' && git push && git tag -a $npm_package_version -F- <<EOF && git push origin $npm_package_version && git push origin $npm_package_version
|
||||
$release_notes
|
||||
EOF`,(error)=>console.log(error));
|
||||
|
|
|
|||
Loading…
Reference in a new issue