Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up workflow to automatically publish release on new tags #23

Merged
merged 2 commits into from
Jun 21, 2022

Conversation

jodyheavener
Copy link
Member

Right now when we want to put out a new version we need to:

  1. Update the version in package.json, commit it
  2. Create a new tag with the new version
  3. Push to the remote
  4. Publish the extension to the VS Code Marketplace locally (vsce publish)
  5. Create a new VSIX file locally (vsce package)
  6. Create a new Release with the VSIX file

Let's make this easier!

First, I realized Yarn has yarn version, so I've updated the README to document this and it'll take care of the first three steps.

Next I've added a new Workflow that takes care of the last three steps and does the following:

  • Activates whenever a new tag beginning with a v is pushed.
  • Sets the GITHUB_TOKEN permission such that it can write to the repo (this is used for the releases action)
  • Sets up Node, Yarn, etc.
  • Uses the HaaLeo/publish-vscode-extension GitHub Action to create a new release for the VS Code Marketplace.
    • Uses a VS_MARKETPLACE_TOKEN secret I've set up
    • Takes care of building and packaging everything
  • Uses the softprops/action-gh-release GitHub Action to create a new GitHub Release in the repo
    • Defaults title of Release to tag name
    • The previous action provides us with a path to the VSIX file it just published so that we can attach it as a file to the Release

@jodyheavener jodyheavener merged commit ec2f690 into main Jun 21, 2022
@jodyheavener jodyheavener deleted the jh/auto-publish branch October 26, 2022 18:37
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.

1 participant