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

Rework automated versioning #103

Merged
merged 5 commits into from
Dec 13, 2024
Merged

Conversation

jeff-horton-ho-sas
Copy link
Contributor

@jeff-horton-ho-sas jeff-horton-ho-sas commented Dec 12, 2024

This repo ist still on version 1 of https://github.com/UKHomeOffice/sas-github-workflows. In V2 the versioning and tagging is done on merge of PR to main. By default these use ci --ignore-scripts. Because the repo used deprecated prepublish which only runs before npm ci and npm install the --ignore-scripts was causing the npm artefact to be published without the built js files.

I've updated the repo to use prepare which runs on install and publish.

There are some other issues with this workflow that I'm hoping to fix:

  • The workflow does not have permission to push the semver tag
  • In v2 the updated package.json and lockfile after npm version is not committed
    • In v1 package.json was committed, but package-lock.json was omitted leading them to get out of sync.

This copies the npm publish workflow from sas-github-workflows, with modifications to correct the above issues.

  • Permissions: contents: read -> contents: write
  • Added "Configure git" and "Commit version" steps

Once tested here, the changes will be submitted to sas-github-workflows and if accepted the custom workflow will be replaced with the shared v2 workflow.

Dependency updates
The module was failing to pass audit tests due to a large number of critical vulnerabilities. To fix this:

  • Rollup -> v2
  • Babel -> v7
  • Eslint -> v8
  • Jest -> v29

There a number of further changes to plugins and config for the above.

@jeff-horton-ho-sas jeff-horton-ho-sas requested a review from a team December 12, 2024 18:46
@jeff-horton-ho-sas jeff-horton-ho-sas self-assigned this Dec 12, 2024
@jeff-horton-ho-sas jeff-horton-ho-sas merged commit 24ff838 into main Dec 13, 2024
6 checks passed
@jeff-horton-ho-sas jeff-horton-ho-sas deleted the rework-automated-versioning branch December 13, 2024 09:35
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.

2 participants