pulsar-edit / pulsar

A Community-led Hyper-Hackable Text Editor
https://pulsar-edit.dev
Other
3.33k stars 140 forks source link

CI: Upgrade or replace all deprecated GH Actions #983

Closed DeeDeeG closed 7 months ago

DeeDeeG commented 7 months ago

Summary of changes

Motivation and Context

Context: Node 16 actions are deprecated. See: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

Most of these were old versions of actions which were running on Node 16. Upgraded them to newer versions which run on Node 20 instead.

Also tried to replace setup-xvfb action with a direct xvfb-run command, as the setup-xvfb action hasn't been updated in a while, its author isn't responding to an issue asking for it to update from Node 16 to Node 20, and GitHub Actions Ubuntu runners include xvfb out of the box now, something that may not have been true (???) when the action was first created. I dunno. Worth a try. UPDATE: Working.

UPDATE: Also replaced git-auto-commit-action with a short inline script, avoiding another external dependency. (Bash scripts generally don't expire or bitrot very quickly, so this one should last us for a while!) (This one had an update to run on Node 20 instead of 16, but I'm good with git, and from that vantage point, this seemed like a good thing to take in-house and cut out the external dependency.)

Side note: For both of these actions that I made into inline scripts in the workflow .yml files, I studied what the action itself did, and replicated as closely as I thought would be relevant to our use of it. They pass in CI, meaning they are doing what they are supposed to. It just works :tm:. So far, at least.

Verification Process

Going to let CI run on this PR! Let's hope this works. Update: CI is passing!

Also tested the Documentation workflow on my fork. Worked.

FWIW, I reviewed the changelogs of all updated Actions. Didn't see anything too crazy or out-of-place.

Screenshots

Before (lots of deprecation warnings) (click to expand): ![Pulsar's CI summary page showing an Annotations box with numerous two warnings about numerous deprecated packages -- Node js 16 actions are deprecated Please update the following actions to use Node js 20](https://github.com/pulsar-edit/pulsar/assets/20157115/0cad215b-aca7-40d6-95a9-e63e90269164)
After (no deprecation warnings) (click to expand): ![Pulsar's CI summary page, with no Annotations box, no deprecation warnings](https://github.com/pulsar-edit/pulsar/assets/20157115/a1c238c4-4e8a-4be4-a5a8-6cd2f071cc40)
DeeDeeG commented 7 months ago

By the way: With this PR, the only external GitHub Actions we use is a pinned exact commit of nick-fields/retry. I like fewer external dependencies!

DeeDeeG commented 7 months ago

See these changelogs if you want to know what changed in the various GitHub Actions:

DeeDeeG commented 7 months ago

Thank you for the review, hopefully I can review some other open PR's myself soon, working on various backlog things, etc.

But for now, merging this one!