Skip to content

Commit

Permalink
fix: version bumped
Browse files Browse the repository at this point in the history
  • Loading branch information
Vikram Kalta authored and Vikram Kalta committed Oct 11, 2023
2 parents f94e24c + ed5ed2b commit 348d3d5
Show file tree
Hide file tree
Showing 4 changed files with 434 additions and 359 deletions.
50 changes: 42 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,54 @@ jobs:
node-version: "18.x"
- run: npm install

- name: get-npm-version
id: package-version
uses: martinbeentjes/[email protected]
- name: install npm packall
run: npm install npm-pack-all

- run: node node_modules/.bin/npm-pack-all
- uses: Klemensas/action-autotag@stable
id: update_tag
# The below action will see the existing tags and will bump the current ones and this is only used to check whether the given tag already exists or not
# We will be using the previous tag to compare with the current tag in the package.json
# If both match then no new release would be triggered
# Else New release will be created
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
tag_prefix: "v"
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: false
# Getting the version info from package.json
- name: get-npm-version
id: package-version
uses: martinbeentjes/[email protected]
# Here we are checking whether this is the first release or not and then checking if it is release or not
- name: check-first-release
env:
First_Release: ${{steps.tag_version.outputs.previous_tag=='v0.0.0'}}
run: |
if ${First_Release} == true; then
echo "fr=true" >> $GITHUB_ENV
echo "flag set to true"
else
echo "fr=false" >> $GITHUB_ENV
echo "flag set to false"
fi
- name: check-release-version
if: ${{env.fr=='false'}}
env:
old_version: ${{steps.tag_version.outputs.previous_tag}}
new_version: v${{steps.package-version.outputs.current-version}}
run: |
echo ${old_version}
echo ${new_version}
echo ${{env.old_version==env.new_version}}
if ${{env.old_version!=env.new_version}}; then
echo "fr=true" >> $GITHUB_ENV
echo "flag set to true"
else
echo "fr=false" >> $GITHUB_ENV
echo "flag set to false"
fi
- name: github-release
if: steps.update_tag.outputs.tagname
if: ${{env.fr=='true'}}
id: github-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion oclif.manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.1.7",
"version": "1.1.10",
"commands": {
"cm:stacks:validate-regex": {
"id": "cm:stacks:validate-regex",
Expand Down
Loading

0 comments on commit 348d3d5

Please sign in to comment.