Skip to content

Commit

Permalink
chore: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Apr 12, 2024
1 parent 3b5da56 commit 895ddef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/onPushToMain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@ jobs:
id: version-check
run: |
package_version=$(node -p "require('./package.json').version")
# gh api repos/oclif/test-plugin-release/releases/tags/v5.0.5 >/dev/null 2>&1 && echo "Tag exists" || echo "Tag does not exist"
echo "gh api repos/${{ github.repository }}/releases/tags/v$package_version"
gh api repos/${{ github.repository }}/releases/tags/v$package_version
exists=$(gh api repos/${{ github.repository }}/releases/tags/v$package_version >/dev/null 2>&1 && echo "true" || echo "")
if [ -n "$exists" ];
then
echo "Version v$package_version already exists"
echo "::warning file=package.json,line=1::Version v$package_version already exists"
echo "::warning file=package.json,line=1::Version v$package_version already exists - no release will be created. If you want to create a new release, please update the version in package.json and push again."
echo "skipped=true" >> $GITHUB_OUTPUT
else
echo "Version v$package_version does not exist"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@oclif/test-plugin-release",
"description": "plugin for testing GHA for oclif templates",
"version": "5.0.5",
"version": "5.0.6",
"author": "Salesforce",
"bin": {
"oex": "./bin/run.js"
Expand Down

0 comments on commit 895ddef

Please sign in to comment.