Fix automatic updating

This commit is contained in:
Mayuran Visakan 2023-08-15 15:21:24 +01:00
parent 8c3c90b64b
commit b758c672a4
2 changed files with 5 additions and 2 deletions

View file

@ -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

View file

@ -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));