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

Improve release workflow #4307

Merged
merged 1 commit into from
Feb 23, 2025
Merged

Improve release workflow #4307

merged 1 commit into from
Feb 23, 2025

Conversation

jesseduffield
Copy link
Owner

@jesseduffield jesseduffield commented Feb 22, 2025

  1. the cron schedule was wrong: it was doing every saturday, rather than the first saturday of each month.
  2. It wasn't triggering a deploy despite pushing a tag because clearly github doesn't want that to happen.

Now it triggers a deploy, and it also allows triggering from the UI, letting you specify minor/patch bump and whether to ignore blocking PRs/issues. As such I'm removing support for the old method of pushing the tag. The new way is the only way.

image

  • PR Description

  • Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@jesseduffield jesseduffield force-pushed the improve-release-workflow branch from a8fef09 to fbb96ca Compare February 22, 2025 11:47
Copy link

codacy-production bot commented Feb 22, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 2ceecad1
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (2ceecad) Report Missing Report Missing Report Missing
Head commit (fcf48c4) 53088 45982 86.61%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4307) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

with:
go-version: 1.22.x

- name: Run goreleaser
Copy link
Owner Author

Choose a reason for hiding this comment

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

Goreleaser/homebrew now happen sequentially rather than in parallel, because speed is not important and it reduces the chance of issues from one step failing and the other succeeding

Copy link
Owner Author

@jesseduffield jesseduffield Feb 22, 2025

Choose a reason for hiding this comment

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

We'll need to confirm whether goreleaser behaves differently if the workflow itself was not triggered from a tag. Likewise with homebrew.

EDIT: Asked about this in the goreleaser repo: goreleaser/goreleaser-action#492

Copy link
Owner Author

Choose a reason for hiding this comment

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

Confirmed that this should be fine

@jesseduffield jesseduffield force-pushed the improve-release-workflow branch from fbb96ca to 680eacc Compare February 22, 2025 11:53
@jesseduffield jesseduffield added the maintenance For refactorings, CI changes, tests, version bumping, etc label Feb 22, 2025
@jesseduffield
Copy link
Owner Author

Assigning you as a reviewer @stefanhaller


on:
schedule:
# Runs at 2:00 AM UTC on the first Saturday of every month
- cron: '0 2 * * 6'
workflow_dispatch: # Allow manual triggering of the workflow
- cron: '0 2 1-7 * 6'
Copy link
Owner Author

Choose a reason for hiding this comment

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

Copy link
Owner Author

Choose a reason for hiding this comment

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

Splitting this part out into a smaller PR in case the rest of this PR takes longer to merge: #4308

@jesseduffield jesseduffield force-pushed the improve-release-workflow branch from 680eacc to c448194 Compare February 22, 2025 11:59
with:
token: ${{secrets.GITHUB_API_TOKEN}}
formula: lazygit
tag: ${{env.new_tag}}
Copy link
Owner Author

Choose a reason for hiding this comment

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

@jesseduffield jesseduffield mentioned this pull request Feb 22, 2025
7 tasks
jesseduffield added a commit that referenced this pull request Feb 22, 2025
It was previously on each saturday. Splitting this out from
#4307 in case that takes
longer to merge.

- **PR Description**

- **Please check if the PR fulfills these requirements**

* [ ] Cheatsheets are up-to-date (run `go generate ./...`)
* [ ] Code has been formatted (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting))
* [ ] Tests have been added/updated (see
[here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md)
for the integration test guide)
* [ ] Text is internationalised (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation))
* [ ] If a new UserConfig entry was added, make sure it can be
hot-reloaded (see
[here](https://github.com/jesseduffield/lazygit/blob/master/docs/dev/Codebase_Guide.md#using-userconfig))
* [ ] Docs have been updated if necessary
* [ ] You've read through your own file changes for silly mistakes etc

<!--
Be sure to name your PR with an imperative e.g. 'Add worktrees view'
see https://github.com/jesseduffield/lazygit/releases/tag/v0.40.0 for
examples
-->
@stefanhaller
Copy link
Collaborator

Assigning you as a reviewer @stefanhaller

I'm super unfamiliar with all this stuff, I don't see how I could provide a review that's helpful in any way. I fully trust you that you know what you're doing. 😀

1) the cron schedule was wrong: it was doing every saturday, rather than
the first saturday of each month.
2) It wasn't triggering a deploy despite pushing a tag because clearly
github doesn't want that to happen.

Now it triggers a deploy, and it also allows triggering from the UI,
letting you specify minor/patch bump and whether to ignore blocking
PRs/issues. As such I'm removing support for the old method of pushing
the tag. The new way is the only way.
@jesseduffield jesseduffield force-pushed the improve-release-workflow branch from c448194 to fcf48c4 Compare February 23, 2025 20:18
@jesseduffield jesseduffield merged commit e62aeb9 into master Feb 23, 2025
15 checks passed
@jesseduffield jesseduffield deleted the improve-release-workflow branch February 23, 2025 20:34
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Feb 26, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [jesseduffield/lazygit](https://github.com/jesseduffield/lazygit) | patch | `v0.47.1` -> `v0.47.2` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>jesseduffield/lazygit (jesseduffield/lazygit)</summary>

### [`v0.47.2`](https://github.com/jesseduffield/lazygit/releases/tag/v0.47.2)

[Compare Source](jesseduffield/lazygit@v0.47.1...v0.47.2)

<!-- Release notes generated using configuration in .github/release.yml at v0.47.2 -->

Small patch release for you all. This is mainly to fix an issue with v0.47.1 which erroneously re-indented users' lazygit config files on startup.

Shout-out to [@&#8203;karimkhaleel](https://github.com/karimkhaleel) for his MR with some gnarly yaml-handling code.

And a special shout-out to [@&#8203;ChrisMcD1](https://github.com/ChrisMcD1) who has been pumping out many great contributions lately. Great to have you aboard.

#### What's Changed

##### Enhancements 🔥

-   Skip post-checkout hook when discarding changes by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4313

##### Fixes 🔧

-   fix: Disable global keybinds when confirmation is active by [@&#8203;ChrisMcD1](https://github.com/ChrisMcD1) in jesseduffield/lazygit#4284
-   Don't rewrite config file unnecessarily when it contains commitPrefixes by [@&#8203;ChrisMcD1](https://github.com/ChrisMcD1) in jesseduffield/lazygit#4311
-   Change side panel width calculation to work for larger numbers by [@&#8203;ChrisMcD1](https://github.com/ChrisMcD1) in jesseduffield/lazygit#4287

##### Maintenance ⚙️

-   Fix auto-release schedule by [@&#8203;jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#4308
-   Use indentation of 2 when rewriting auto-migrated config file by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4312
-   Use refs in jsonschema by [@&#8203;karimkhaleel](https://github.com/karimkhaleel) in jesseduffield/lazygit#4309
-   Improve release workflow by [@&#8203;jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#4307
-   Filter out dev comments from schema by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4319
-   Fix release script by [@&#8203;jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#4322
-   Fix release script once again by [@&#8203;jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#4323

##### Docs 📖

-   Improve the error message when users have gpg signing turned on by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4296

**Full Changelog**: jesseduffield/lazygit@v0.47.1...v0.47.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODAuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE4MC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance For refactorings, CI changes, tests, version bumping, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants