Skip to content

Add release workflows#25

Merged
Mrtenz merged 5 commits intomainfrom
mrtenz/release-workflow
Mar 7, 2025
Merged

Add release workflows#25
Mrtenz merged 5 commits intomainfrom
mrtenz/release-workflow

Conversation

@Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Mar 7, 2025

This adds several files and workflows for linting and releasing the action. This follows the release process that we use for most of our libraries. When released, the publish action will take care of tagging and creating the GitHub release.

I've also updated the repository to be standardised, including a changelog, lint tooling, and @lavamoat/allow-scripts for security.

Note

An action-publish environment needs to be set up in the repository settings.

`action-publish` environment configuration image

@Mrtenz Mrtenz requested a review from a team as a code owner March 7, 2025 09:26
@socket-security
Copy link

socket-security bot commented Mar 7, 2025

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/merge-stream@2.0.0, npm/cosmiconfig@7.1.0, npm/execa@5.1.1, npm/resolve-dir@1.0.1, npm/expand-tilde@2.0.2, npm/global-prefix@1.0.2, npm/npm-normalize-package-bin@3.0.1, npm/abbrev@2.0.0, npm/write-file-atomic@5.0.1, npm/@npmcli/node-gyp@3.0.0, npm/read-cmd-shim@4.0.0, npm/diff@5.2.0, npm/http-proxy-agent@7.0.2, npm/@npmcli/agent@2.2.2, npm/make-fetch-happen@13.0.1, npm/@npmcli/promise-spawn@7.0.2, npm/minipass-fetch@3.0.5, npm/validate-npm-package-name@5.0.1, npm/@lavamoat/preinstall-always-fail@2.1.0, npm/negotiator@0.6.4, npm/cross-spawn@7.0.6, npm/node-gyp@10.3.1, npm/socks-proxy-agent@8.0.5, npm/agent-base@7.1.3

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

Copy link
Contributor

@EllusionN EllusionN left a comment

Choose a reason for hiding this comment

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

Thank you so much for taking the time to set us up! This helps us big time and gives us a model we can use for other actions.

Overall looks good but I have one question about the flow:

Should each PR with a notable change update the changelog themselves, or is the changelog generated and updated at the time that the release PR has been created?

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update shorthand major version tag
run: |
./.github/workflows/scripts/update-major-version-tag.sh \
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a file we need to include in our repository? I only see it referenced in a couple locations.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is, I forgot to add it. Added now!

For clarity, the script updates the major tag for each release (e.g., v1.2.3 -> v1).

@Mrtenz
Copy link
Member Author

Mrtenz commented Mar 7, 2025

Should each PR with a notable change update the changelog themselves, or is the changelog generated and updated at the time that the release PR has been created?

It's updated by the "Create Release Pull Request" workflow, after which we modify it slightly to include the appropriate sections and any additional context that may be helpful to consumers. Happy to create the first release for you, so it's clear how it works!

@Mrtenz
Copy link
Member Author

Mrtenz commented Mar 7, 2025

@SocketSecurity ignore npm/merge-stream@2.0.0
@SocketSecurity ignore npm/cosmiconfig@7.1.0
@SocketSecurity ignore npm/resolve-dir@1.0.1
@SocketSecurity ignore npm/expand-tilde@2.0.2
@SocketSecurity ignore npm/global-prefix@1.0.2
@SocketSecurity ignore npm/npm-normalize-package-bin@3.0.1
@SocketSecurity ignore npm/abbrev@2.0.0
@SocketSecurity ignore npm/write-file-atomic@5.0.1
@SocketSecurity ignore npm/@npmcli/node-gyp@3.0.0
@SocketSecurity ignore npm/read-cmd-shim@4.0.0
@SocketSecurity ignore npm/diff@5.2.0
@SocketSecurity ignore npm/validate-npm-package-name@5.0.1
@SocketSecurity ignore npm/@lavamoat/preinstall-always-fail@2.1.0
@SocketSecurity ignore npm/negotiator@0.6.4

New author is ok.

@SocketSecurity ignore npm/execa@5.1.1
@SocketSecurity ignore npm/@npmcli/promise-spawn@7.0.2
@SocketSecurity ignore npm/cross-spawn@7.0.6
@SocketSecurity ignore npm/node-gyp@10.3.1

This is expected to have shell access.

@SocketSecurity ignore npm/http-proxy-agent@7.0.2
@SocketSecurity ignore npm/@npmcli/agent@2.2.2
@SocketSecurity ignore npm/make-fetch-happen@13.0.1
@SocketSecurity ignore npm/minipass-fetch@3.0.5
@SocketSecurity ignore npm/socks-proxy-agent@8.0.5
@SocketSecurity ignore npm/agent-base@7.1.3

This is expected to have network access.

@socket-security
Copy link

Report too large to display inline

View full report↗︎

@Mrtenz Mrtenz merged commit 4b2dbae into main Mar 7, 2025
10 checks passed
@Mrtenz Mrtenz mentioned this pull request Mar 7, 2025
@Mrtenz Mrtenz deleted the mrtenz/release-workflow branch March 7, 2025 17:11
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