mirror of
https://github.com/iosonntag/obsidian-plugin-treefocus.git
synced 2026-07-22 08:40:29 +00:00
fix(ci): fixed a bug where the pipeline did not submit a release
This commit is contained in:
parent
0ec2090286
commit
f6d7004d7a
2 changed files with 35 additions and 33 deletions
50
.github/workflows/release.yml
vendored
50
.github/workflows/release.yml
vendored
|
|
@ -33,34 +33,36 @@ jobs:
|
|||
|
||||
- name: Print next version
|
||||
run: |
|
||||
echo ${{ steps.chkVersion.outputs.NEXT_RELEASE_VERSION }}
|
||||
echo ${{ steps.chkVersion.outputs.NEXT_RELEASE_VERSION }}
|
||||
echo "The next version is ${{ steps.chkVersion.outputs.NEXT_RELEASE_VERSION && steps.chkVersion.outputs.NEXT_RELEASE_VERSION || 'N/A' }}" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
|
||||
|
||||
- name: Update version files and create tag
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
VERSION=$(node -p "require('./package.json').version")
|
||||
echo "Updating version files to $VERSION"
|
||||
pnpm run version
|
||||
git config user.name github-actions
|
||||
git config user.email github-actions@github.com
|
||||
git add .
|
||||
git commit -am "chore(release): v${{ steps.chkVersion.outputs.NEXT_RELEASE_VERSION }} [skip ci]\n\n${{ steps.chkVersion.outputs.NEXT_RELEASE_NOTES }}"
|
||||
git tag -a $VERSION -m "$VERSION"
|
||||
git push origin $VERSION
|
||||
|
||||
|
||||
- name: Build plugin
|
||||
run: |
|
||||
pnpm install
|
||||
pnpm run build
|
||||
|
||||
# - name: Update version files and create tag
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# run: |
|
||||
# VERSION=$(node -p "require('./package.json').version")
|
||||
# echo "Updating version files to $VERSION"
|
||||
# pnpm run version
|
||||
# git config user.name github-actions
|
||||
# git config user.email github-actions@github.com
|
||||
# git add .
|
||||
# git commit -am "CI/CD: Updated version files to $VERSION"
|
||||
# git tag -a $VERSION -m "$VERSION"
|
||||
# git push origin $VERSION
|
||||
- name: Create release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
VERSION=$(node -p "require('./package.json').version")
|
||||
|
||||
# - name: Create release
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# run: |
|
||||
# VERSION=$(node -p "require('./package.json').version")
|
||||
|
||||
# gh release create "$VERSION" \
|
||||
# --title="Release v$VERSION" \
|
||||
# main.js manifest.json styles.css
|
||||
gh release create "$VERSION" \
|
||||
--title="Release v$VERSION" \
|
||||
main.js manifest.json styles.css
|
||||
|
|
@ -52,15 +52,15 @@ module.exports = {
|
|||
"populateVersion": "pnpm run version"
|
||||
}
|
||||
],
|
||||
[
|
||||
"@semantic-release/exec",
|
||||
{
|
||||
"populateVersion": "VERSION=$(node -p \"require('./package.json').version\")\n" +
|
||||
"gh release create \"$VERSION\" \
|
||||
--title=\"Release v$VERSION\" \
|
||||
main.js manifest.json styles.css"
|
||||
}
|
||||
],
|
||||
// [
|
||||
// "@semantic-release/exec",
|
||||
// {
|
||||
// "populateVersion": "VERSION=$(node -p \"require('./package.json').version\")\n" +
|
||||
// "gh release create \"$VERSION\" \
|
||||
// --title=\"Release v$VERSION\" \
|
||||
// main.js manifest.json styles.css"
|
||||
// }
|
||||
// ],
|
||||
// "@semantic-release/github",
|
||||
// {
|
||||
// "assets": [
|
||||
|
|
|
|||
Loading…
Reference in a new issue