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

Automate GitHub Release #5641

Open
wants to merge 6 commits into
base: automate-build-release
Choose a base branch
from

Conversation

domoscargin
Copy link
Contributor

@domoscargin domoscargin commented Jan 22, 2025

What

resolves #5608

Automates our GitHub releases through a workflow_dispatch GitHub Actions workflow.

The workflow creates a GitHub tag for the version in the package.json file. It also creates a zip file, and generates release notes from the CHANGELOG, before creating a release.

If the tag or the release already exist, the job will fail, and these will need to be manually deleted via the UI.

Notes

It's possible to skip the tag creation step, since gh release automatically creates a tag for the release if it doesn't exist. This PR keeps this step so that the tags/release are fully consistent with every previous release tag on the repo.

Copy link

github-actions bot commented Jan 22, 2025

📋 Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 118.52 KiB
dist/govuk-frontend-development.min.js 42.7 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 92.81 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 87.12 KiB
packages/govuk-frontend/dist/govuk/all.mjs 1.25 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend-component.mjs 1.74 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 118.51 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 42.69 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.55 KiB
packages/govuk-frontend/dist/govuk/init.mjs 7.13 KiB

Modules

File Size (bundled) Size (minified)
all.mjs 82.57 KiB 40.4 KiB
accordion.mjs 26.58 KiB 13.41 KiB
button.mjs 9.09 KiB 3.78 KiB
character-count.mjs 25.39 KiB 10.9 KiB
checkboxes.mjs 7.81 KiB 3.42 KiB
error-summary.mjs 10.99 KiB 4.54 KiB
exit-this-page.mjs 20.2 KiB 10.34 KiB
header.mjs 6.46 KiB 3.22 KiB
notification-banner.mjs 9.35 KiB 3.7 KiB
password-input.mjs 18.24 KiB 8.33 KiB
radios.mjs 6.81 KiB 2.98 KiB
service-navigation.mjs 6.44 KiB 3.26 KiB
skip-link.mjs 6.4 KiB 2.76 KiB
tabs.mjs 12.04 KiB 6.67 KiB

View stats and visualisations on the review app


Action run for 6e45dfa

@domoscargin domoscargin force-pushed the automate-publish-release-to-github branch from e6a1b6a to ee682da Compare January 22, 2025 15:50
@domoscargin domoscargin force-pushed the automate-publish-release-to-github branch from ee682da to ddd4e44 Compare January 22, 2025 15:55
@domoscargin domoscargin force-pushed the automate-publish-release-to-github branch from ddd4e44 to 00ca872 Compare January 22, 2025 16:01
@domoscargin domoscargin force-pushed the automate-publish-release-to-github branch from 00ca872 to 1b24a1c Compare January 22, 2025 16:04
@domoscargin domoscargin force-pushed the automate-publish-release-to-github branch from 1b24a1c to 4374074 Compare January 22, 2025 16:07
@domoscargin domoscargin force-pushed the automate-publish-release-to-github branch from 4374074 to dcd78a7 Compare January 22, 2025 16:52
@domoscargin domoscargin changed the title Create initial publish workflow Automate GitHub Release Jan 22, 2025
@domoscargin domoscargin changed the title Automate GitHub Release WIP: Automate GitHub Release Jan 22, 2025
@domoscargin domoscargin force-pushed the automate-publish-release-to-github branch from 1c66edd to db8212d Compare January 22, 2025 21:36
@domoscargin domoscargin force-pushed the automate-publish-release-to-github branch from d68b862 to 076bb32 Compare January 22, 2025 21:49
@domoscargin domoscargin force-pushed the automate-publish-release-to-github branch from 8bbd97d to c29878a Compare January 22, 2025 22:12
@domoscargin domoscargin changed the title WIP: Automate GitHub Release Automate GitHub Release Jan 22, 2025
@domoscargin domoscargin changed the base branch from main to automate-build-release January 22, 2025 22:13
@domoscargin domoscargin force-pushed the automate-publish-release-to-github branch from c29878a to 548a384 Compare January 22, 2025 22:22
@domoscargin domoscargin force-pushed the automate-publish-release-to-github branch from 548a384 to b84b2e4 Compare January 22, 2025 22:29
@domoscargin domoscargin force-pushed the automate-publish-release-to-github branch from b84b2e4 to f07c25f Compare January 22, 2025 22:38
@domoscargin domoscargin marked this pull request as ready for review January 22, 2025 22:39
@domoscargin domoscargin requested a review from a team as a code owner January 22, 2025 22:39
@owenatgov owenatgov force-pushed the automate-build-release branch 5 times, most recently from dd45487 to 46d1b86 Compare January 24, 2025 15:58
Adds a script which:

- validates the new version based on the version in the changelog
- updates the changelog headings
- gneerates release notes from the changelog
@owenatgov owenatgov force-pushed the automate-build-release branch from 46d1b86 to c806c93 Compare January 24, 2025 16:03
@owenatgov
Copy link
Contributor

#5635 has been updated so this just needs a rebase and then we can review properly.

@domoscargin domoscargin force-pushed the automate-publish-release-to-github branch from f07c25f to 6e45dfa Compare January 24, 2025 23:21
Copy link
Contributor

@owenatgov owenatgov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One non-blocking comment. I don't have anything to add, this looks grand to me!

I don't know if we want to merge now or wait for #5635 to be mergable and then merge this into main. Up to you.

4. Add release notes from [`CHANGELOG.md`](/CHANGELOG.md)
5. Attach as release binary the ZIP file that has been generated at the root of this project during the npm publishing phase
6. Publish release
1. Open the ["RELEASE: Publish to GitHub" workflow](https://github.com/alphagov/govuk-frontend/actions/workflows/publish-release-to-github.yaml) and run the workflow on the `main` branch. This will generate a GitHub tag and release. If the workflow fails after creating a tag, or after creating a release, you'll need to manually delete these via the GitHub UI before running the workflow again.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth linking to the tags UI for ease?

Suggested change
1. Open the ["RELEASE: Publish to GitHub" workflow](https://github.com/alphagov/govuk-frontend/actions/workflows/publish-release-to-github.yaml) and run the workflow on the `main` branch. This will generate a GitHub tag and release. If the workflow fails after creating a tag, or after creating a release, you'll need to manually delete these via the GitHub UI before running the workflow again.
1. Open the ["RELEASE: Publish to GitHub" workflow](https://github.com/alphagov/govuk-frontend/actions/workflows/publish-release-to-github.yaml) and run the workflow on the `main` branch. This will generate a GitHub tag and release. If the workflow fails after creating a tag, or after creating a release, you'll need to manually delete these via [the GitHub tags UI](https://github.com/alphagov/govuk-frontend/tags) before running the workflow again.

@owenatgov owenatgov force-pushed the automate-build-release branch from c806c93 to d22f8bf Compare January 27, 2025 12:05
owenatgov and others added 2 commits January 27, 2025 12:19
Co-authored-by: Brett Kyle <[email protected]>
Co-authored-by: Owen Jones <[email protected]>
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.

3 participants