fix(ci): fixed a bug where the pipeline did not submit a release

This commit is contained in:
iOSonntag 2023-09-24 09:56:51 +02:00
parent 0ec2090286
commit f6d7004d7a
No known key found for this signature in database
2 changed files with 35 additions and 33 deletions

View file

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

View file

@ -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": [