Skip to content

Commit

Permalink
Remove logs for testing and revert back to checking out develop
Browse files Browse the repository at this point in the history
Co-authored-by: Mukul Mishra <[email protected]>
Co-authored-by: Giuseppe Samela <[email protected]>
  • Loading branch information
3 people committed Dec 5, 2024
1 parent eb9c76a commit 31c6e94
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 44 deletions.
19 changes: 1 addition & 18 deletions .github/scripts/defineVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ async function defineReleaseVersion({ core }, currentVersion, changelogFile, isM
return;
}

console.log('defining release version...');

const parsedSections = unreleased.parsed;

const hasAddedSection = parsedSections.Added && parsedSections.Added.length > 0;
Expand All @@ -22,21 +20,6 @@ async function defineReleaseVersion({ core }, currentVersion, changelogFile, isM
const hasSecurityEntries = parsedSections.Security && parsedSections.Security.length > 0;
const hasDeprecatedEntries = parsedSections.Deprecated && parsedSections.Deprecated.length > 0;

const dataObj = {
unreleased,
parsedSections,
hasAddedSection,
hasChangedSection,
hasRemovedSection,
hasFixedSection,
hasSecurityEntries,
hasDeprecatedEntries,
};
const dataStr = JSON.stringify(dataObj, null, ' ');

console.log(dataStr);
core.info(dataStr);

if (isMajorRelease) {
const version = semver.inc(currentVersion, 'major');
core.info(`Increase version from ${currentVersion} to ${version}`);
Expand All @@ -50,7 +33,7 @@ async function defineReleaseVersion({ core }, currentVersion, changelogFile, isM
core.info(`Increase version from ${currentVersion} to ${version}`);
return version;
} else {
core.error('No valid entries to release, ' + JSON.stringify(unreleased) + ', ' + JSON.stringify(parsedSections));
core.error('No valid entries to release');
}
});
}
Expand Down
52 changes: 26 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.RELEASE_DEPLOY_KEY }}
ref: feature/PW-21834/improve-vst-tracking
ref: develop

- name: Set up node.js
uses: actions/[email protected]
Expand Down Expand Up @@ -55,28 +55,28 @@ jobs:
const { defineReleaseVersion } = require('./.github/scripts/defineVersion.js')
return defineReleaseVersion({core}, "${{ steps.read-latest-release-version.outputs.latestReleaseVersion }}", './CHANGELOG.md', ${{ inputs.is-major-release }})
# - name: Bump package.json and Changelog version
# run: |
# npm --no-git-tag-version version "${{ fromJson(steps.define-release-version.outputs.result) }}"
# npx kacl release
#
# - name: Add tag and push changes
# run: |
# git config --global user.name 'Automated Release'
# git config --global user.email '[email protected]'
# git add .
# git commit -m "Bump version and update changelog"
# git tag -a "${{ fromJson(steps.define-release-version.outputs.result) }}" -m "v${{ fromJson(steps.define-release-version.outputs.result) }}"
# git push origin develop
# git push origin --tags
#
# - name: build and publish
# run: |
# echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
# npm publish
#
# - name: Create GitHub release
# uses: softprops/action-gh-release@v2
# with:
# generate_release_notes: true
# tag_name: ${{ fromJson(steps.define-release-version.outputs.result) }}
- name: Bump package.json and Changelog version
run: |
npm --no-git-tag-version version "${{ fromJson(steps.define-release-version.outputs.result) }}"
npx kacl release
- name: Add tag and push changes
run: |
git config --global user.name 'Automated Release'
git config --global user.email '[email protected]'
git add .
git commit -m "Bump version and update changelog"
git tag -a "${{ fromJson(steps.define-release-version.outputs.result) }}" -m "v${{ fromJson(steps.define-release-version.outputs.result) }}"
git push origin develop
git push origin --tags
- name: build and publish
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
npm publish
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
tag_name: ${{ fromJson(steps.define-release-version.outputs.result) }}

0 comments on commit 31c6e94

Please sign in to comment.