Skip to content

Commit

Permalink
[chore] improve version checking in release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
glassk committed May 13, 2024
1 parent cec12f6 commit 67f3b92
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
with:
fetch-depth: 0

- name: Extract version from package.json
id: package_version
run: echo "::set-output name=version::$(grep '\"version\"' package.json | cut -d '\"' -f 4)"
- name: Check for version update in package.json
id: check_version
uses: EndBug/version-check@v2

- name: Push Git Tag
run: |
TAG="v${{ steps.package_version.outputs.version }}"
TAG="v${{ steps.check_version.outputs.version }}"
git tag $TAG
git push origin $TAG
Expand All @@ -29,14 +29,14 @@ jobs:
uses: mindsers/changelog-reader-action@v2
with:
validation_level: warn
version: ${{ steps.package_version.outputs.version }}
version: ${{ steps.check_version.outputs.version }}
path: ./CHANGELOG.md

- name: Create/update release
uses: ncipollo/release-action@v1
with:
tag: v${{ steps.package_version.outputs.version }}
name: v${{ steps.package_version.outputs.version }}
tag: v${{ steps.check_version.outputs.version }}
name: v${{ steps.check_version.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 0 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,4 @@
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"YOCO.includeFilePath": true,
"githubPullRequests.ignoredPullRequestBranches": [
"dev"
]
}

0 comments on commit 67f3b92

Please sign in to comment.