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

feat: add semantic release #307

Merged
merged 27 commits into from
Sep 18, 2022
Merged

Conversation

bytestream
Copy link
Contributor

@bytestream bytestream commented Dec 16, 2021

Requires a GitHub auth token adding to the repository secrets of name GITHUB_TOKEN https://docs.github.com/en/actions/security-guides/encrypted-secrets

How does it work? https://semantic-release.gitbook.io/semantic-release/#how-does-it-work

Release notes / change log is generated based on fix: / feat: commit messages. So the first automatic release won't include historic commits which don't match that format.

  • NEWS is generated automatically per above using markdown format, so will not look the same as before...
  • WHATSNEW has been removed as it's difficult to automatically generate

Closes #304

@bytestream bytestream marked this pull request as draft December 16, 2021 12:50
@bytestream bytestream marked this pull request as ready for review December 16, 2021 13:04
@ezyang
Copy link
Owner

ezyang commented Dec 24, 2021

So the first automatic release won't include historic commits which don't match that format.

Should do a normal release then before turning this on.

@ezyang
Copy link
Owner

ezyang commented Dec 24, 2021

Will need to setup commitizen/commitlint before landing this to ensure commit messages are valid

@ezyang
Copy link
Owner

ezyang commented Dec 24, 2021

Wondering if we actually want a release every time a PR is merged. Might be better to offer a stable branch (periodic release) and a dev branch (tracking master)

@bytestream
Copy link
Contributor Author

Should do a normal release then before turning this on.

Yeah. I can send a PR with the file updates for the release if you want?

Will need to setup commitizen/commitlint

There's a few GitHub actions that handle stuff like this. I prefer to enforce squashing and lint the PR title. Thoughts - lint PR title, or all commits?

Might be better to offer a stable branch (periodic release) and a dev branch (tracking master)

Releasing after every PR seems to be common in JS libraries. It's up to you, but a periodic release would probably require manual action again

@ezyang
Copy link
Owner

ezyang commented Dec 25, 2021

Yeah. I can send a PR with the file updates for the release if you want?

I just cut 4.14.0 so I think we're clear here.

There's a few GitHub actions that handle stuff like this. I prefer to enforce squashing and lint the PR title. Thoughts - lint PR title, or all commits?

I set the repo to squash by default so we just have to lint PR title.

Releasing after every PR seems to be common in JS libraries. It's up to you, but a periodic release would probably require manual action again

OK, maybe this is me not understanding semantic release, but what's the point of releases if you release every PR. That seems like what a nightly is for.

@bytestream
Copy link
Contributor Author

I set the repo to squash by default so we just have to lint PR title.

I'll look at adding a GitHub Action which lints the PR title.

OK, maybe this is me not understanding semantic release, but what's the point of releases if you release every PR. That seems like what a nightly is for.

It wouldn't necessarily be a point release - feat: for minor release, and fix: for patch release.

I think the only real benefit to releasing after every PR is that it's fully automated. The other benefit is that easy to rollback to a previously working version if one PR breaks something.

Might be better to offer a stable branch (periodic release) and a dev branch (tracking master)

This should be do-able, but would require you to manually merge dev into stable to trigger a release. I'm not sure there's any specific benefit to that flow.

We could perhaps just make semantic-release a manual GitHub Action that only runs on the master branch?

@ezyang
Copy link
Owner

ezyang commented Jan 28, 2022

I'm down to try with a manual GitHub action to start, and then upgrade into continuous if we like it.

@bytestream bytestream changed the title Add semantic release feat: add semantic release Jun 26, 2022
@bytestream
Copy link
Contributor Author

I've updated it so the PR title is linted, and it runs manually.

Two things to note, but I don't think you need to worry about either:

To manually run the action see https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow

bytestream and others added 6 commits June 27, 2022 17:20
YAML will try to interpret numeric values as numbers, leading to `8.0` being
interpreted as `8` instead of `'8.0'`.

This doesn't result in a functional change, but cleans up the output of the
jobs a little (e.g. in the title line).
This does not introduce any functional difference and is intended as a
future-proofing change.

see https://github.com/actions/checkout/releases/tag/v3.0.0
Selecting the `fstools` tests also executed the `htmlt` tests.
* Define HTMLPurifier_AttrTransform_SafeParam::$wmode

This fixes a PHP 8.2 deprecation.

* Define HTMLPurifier_DefinitionCache_DecoratorHarness::$cache

This fixes a PHP 8.2 deprecation.

* Define HTMLPurifier_DefinitionCache_DecoratorHarness::$mock

This fixes a PHP 8.2 deprecation.

* Define HTMLPurifier_DefinitionCache_DecoratorHarness::$def

This fixes a PHP 8.2 deprecation.

* Define HTMLPurifier_EntityParserTest::$_entity_lookup

This fixes a PHP 8.2 deprecation.
TimWolla and others added 7 commits September 2, 2022 21:43
* Add contenteditable attribute definition

* gate behind html.trusted

* use enum
* Add PHP 8.2 to CI

see ezyang#334

* Add PHP 8.2 to composer.json
* Run CSSTidy tests on CI

* update dirname

* use compopser instead of git clone

* use composer

* use test-settings.sample.php

* enable ext-intl

* disable Net_IDNA2
@ezyang
Copy link
Owner

ezyang commented Sep 18, 2022

I plan to merge this after the upcoming release, then do a "stutter" relase to check that this is working

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
@ezyang ezyang merged commit db31243 into ezyang:master Sep 18, 2022
github-actions bot pushed a commit that referenced this pull request Sep 18, 2022
# [4.16.0](v4.15.0...v4.16.0) (2022-09-18)

### Features

* add semantic release ([#307](#307)) ([db31243](db31243)), closes [#322](#322) [#323](#323) [#326](#326) [#327](#327) [#328](#328) [#329](#329) [#330](#330) [#331](#331) [#332](#332) [#333](#333) [#337](#337) [#335](#335) [#334](#334) [#336](#336) [#338](#338)
@github-actions
Copy link

🎉 This PR is included in version 4.16.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@bytestream bytestream deleted the semantic-release branch September 18, 2022 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is a new release planned?
4 participants