Skip to content

Conversation

@yCodeTech
Copy link
Owner

  • Added automatic package.json version bump to the publish extension workflow. It gets the release tag, validates that it's the correct format, removes any prerelease tags it may have (because vscode doesn't like prerelease tags in the extension versions), bump the version in package.json and package.lock with the version from the release tag, commits the changes, force pushes the tag reference to point to the new commit, and then publish the extension to the marketplaces.

- Added automatic package.json version bump to the publish extension workflow. It gets the release tag, validates that it's the correct format, removes any prerelease tags it may have (because vscode doesn't like prerelease tags in the extension versions), bump the version in package.json and package.lock with the version from the release tag, commits the changes, force pushes the tag reference to point to the new commit, and then publish the extension to the marketplaces.
- Added a new workflow step to create a new branch that the package.json version bump will be committed to. The branch will be named in the form of "release/[version]".

- Refactored the Commit Changes step to include error handling and push the new branch to remote.

- Added a new workflow step to create a new PR from the newly created branch. It uses the GitHub's (gh) CLI commands to create the PR and merge it automatically onto the default branch (master) via the auto-merge strategy.

By committing the version bump to a branch and using a PR to merge the changes onto the master branch, we prevent code being committed straight to master. And by using GitHub's auto-merge strategy, we ensure that the commits and PRs adhere to branch protection rules, if there are any.

A new step after the creation will wait for any PR checks to be completed and the PR to be merged. It checks the state of the PR using gh commands to ensure the PR is merged. If the PR is merged within the allotted time (around 5 mins), the step succeeds and continues to the next, otherwise it will error out.

- Refactored the Update Tag References step to pull the latest changes from the branch to ensure it is using the up to date commit.

- Added new step to echo a success message after the extension was published to both marketplaces.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants