Skip to content

Conversation

@marcdumais-work
Copy link
Contributor

@marcdumais-work marcdumais-work commented Jan 18, 2024

Massage a few things in preparation for a first release to npm.

This PR includes a new GitHub workflow that will be used to create GitHub releases (tag + automatically generated release notes), to go along with what we eventually push to npm. I have outlined the flow in the commit message. This effectively automates half of the work - automating the publishing to npm will be left for later. For now I will publish to npm from my laptop.

Note: CI job "Create or prepare GitHub release" failing is normal at this time, because file ./RELEASE does not yet exist on master. Adding it in this PR will fix this for the future.

Once this PR here is merged, I will tell yarn to step the package's version - this will create a new "release" commit. I will amend that commit to add the new tag in file "RELEASE" and will publish from that commit to npm, and then push that commit as a PR. Once that one is merged, the GitHub release should be automatically created to correspond to the published package.

Sounds like a plan?

P.S. here's an example of a GitHub release created in the same way:
The workflow, the PR with updated tag in RELEASE file and the corresponding automatically created release

Signed-off-by: Marc Dumais <[email protected]>
@marcdumais-work marcdumais-work force-pushed the prepare-for-1st-release branch 4 times, most recently from 0ec388f to 99ec37c Compare January 29, 2024 14:35
@marcdumais-work marcdumais-work marked this pull request as draft February 7, 2024 14:55
The new workflow uses a "RELEASE" file to create, when required, new
release tags and GitHub releases. It uses the following GutHub action:

https://github.com/pipe-cd/actions-gh-release

---

With this in place, the release strategy would be to:
- publish to npm locally. As part of publishing, the package's
  version will be stepped in package.json. Create a commit for
  that change and also add/update the RELEASE file (*) with
  corresponding tag.
- push that commit for review to the GitHub project
  - The GitHub action will add a preview of the Github release
    to be created upon merging
- once merged, the new tag and automatically-generated
  GitHub release will be created, that correspond to the
  published npm pacakge

(*) https://github.com/pipe-cd/actions-gh-release#usage

Signed-off-by: Marc Dumais <[email protected]>
@waynebeaton
Copy link
Contributor

Sorry for the long delay. I have only lame excuses for not noticing this.

This sounds like a plan.

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