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

Release process follow ups #220

Merged
merged 32 commits into from
Nov 7, 2023
Merged

Release process follow ups #220

merged 32 commits into from
Nov 7, 2023

Conversation

glennmoy
Copy link
Contributor

@glennmoy glennmoy commented Oct 24, 2023

This knocks out some of items in #210 namely:

  • workflow_dispatch should take as an input the commit sha to use as tag (to enable backports)
  • Pre-Release workflow should check project.version !in tags to allow back ports
  • Set as “latest release” in Publish Release
  • release are based on changes since previous tag
  • stable documenter builds are based on Releases

Not solved yet:

  • how to automatically trigger artifacts_CI workflow after triggering Pre_release CI using workflow_dispatch (seems to ignore that it's a workflow_dispatch and doesn't trigger it)

@glennmoy glennmoy force-pushed the gm/release_followups branch from c68bcfa to 601f06d Compare October 24, 2023 11:38
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #220 (ba45577) into main (5f22740) will increase coverage by 1.13%.
Report is 8 commits behind head on main.
The diff coverage is n/a.

❗ Current head ba45577 differs from pull request most recent head a8bf476. Consider uploading reports for the commit a8bf476 to get more accurate results

@@            Coverage Diff             @@
##             main     #220      +/-   ##
==========================================
+ Coverage   96.98%   98.12%   +1.13%     
==========================================
  Files          12       12              
  Lines         663      639      -24     
==========================================
- Hits          643      627      -16     
+ Misses         20       12       -8     
Flag Coverage Δ
Ray.jl 98.12% <ø> (+1.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 4 files with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

.github/workflows/Pre_release.yml Outdated Show resolved Hide resolved
.github/workflows/Pre_release.yml Outdated Show resolved Hide resolved
id: project_toml
shell: julia --color=yes --project {0}
env:
LATEST_TAG: ${{ steps.latest_tag.outputs.tag }}
run: |
using Pkg.Types
project = read_project("Project.toml")
latest_tag = parse(VersionNumber, ENV["LATEST_TAG"])
tags = parse.(VersionNumber, split(readchomp(`git tag -l`), "\n"))
Copy link
Member

Choose a reason for hiding this comment

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

Just curious if you verified this? I thought maybe we'd have to do git fetch --tags

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@omus omus Nov 6, 2023

Choose a reason for hiding this comment

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

If we create a tag that isn't a version number this will break. We should do:

Suggested change
tags = parse.(VersionNumber, split(readchomp(`git tag -l`), "\n"))
tags = split(readchomp(`git tag -l`), "\n")

and do a string comparison later.

Also, we can simplify this to:

Suggested change
tags = parse.(VersionNumber, split(readchomp(`git tag -l`), "\n"))
tags = readlines(`git tag -l`)

.github/workflows/Pre_release.yml Outdated Show resolved Hide resolved
.github/workflows/Pre_release.yml Show resolved Hide resolved
@glennmoy glennmoy force-pushed the gm/release_followups branch from b00fb32 to 1c216c1 Compare October 24, 2023 18:52
@glennmoy glennmoy force-pushed the gm/release_followups branch from a15ffc4 to 5a30daa Compare October 24, 2023 22:00
@glennmoy
Copy link
Contributor Author

looking into using worflow_run as suggested elsewhere, I don't think this will work as it only runs the workflow against branches and not tags https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#limiting-your-workflow-to-run-based-on-branches

@omus
Copy link
Member

omus commented Oct 25, 2023

looking into using worflow_run as suggested elsewhere, I don't think this will work as it only runs the workflow against branches and not tags https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#limiting-your-workflow-to-run-based-on-branches

Do we need to use workflow_run on tags? Why not use push.tags as the event if you want an action to run on a tag?

@glennmoy
Copy link
Contributor Author

glennmoy commented Oct 25, 2023

Do we need to use workflow_run on tags? Why not use push.tags as the event?

Well, I was exploring it as push.tags isn't being triggered for some reason, even though when triggered via workflow_dispatch it should allow downstream workflows to be triggered https://github.blog/changelog/2022-09-08-github-actions-use-github_token-with-workflow_dispatch-and-repository_dispatch/

For instance: v0.0.3 is still in pre-release because artifacts_CI.yml hasn't run on it. Even though, presumably, you kicked off Pre_release.yml manually.

@glennmoy glennmoy force-pushed the gm/release_followups branch from b41a60e to 9fb8585 Compare November 1, 2023 16:13
@@ -80,10 +82,9 @@ jobs:
git tag $tag ${{ steps.commit.outputs.sha }}
git push origin $tag
- name: Publish Pre-Release
uses: softprops/action-gh-release@v1
uses: ncipollo/release-action@v1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

switching to this action as it allows us to set the rlease as "latest release"

@glennmoy
Copy link
Contributor Author

glennmoy commented Nov 1, 2023

I think the reason the release notes are whack is because our tag is not targetting the main branch

https://github.com/orgs/community/discussions/5975#discussioncomment-1799743

One of the issues folks have been running into here are repositories that are using advanced release strategies with release branches. The new regex is not going to help in those cases.
Our release generating tool is built on top of Pull-Requests and requires that your PRs target the same target branch that the release is created from.

@glennmoy
Copy link
Contributor Author

glennmoy commented Nov 1, 2023

I'll note I'm following along with ncipollo/release-action#198 to see if there's a workaround

@glennmoy
Copy link
Contributor Author

glennmoy commented Nov 1, 2023

I've found https://github.com/mikepenz/release-changelog-builder-action and will look to generate the changelog from that

@glennmoy glennmoy force-pushed the gm/release_followups branch from 20f8156 to 439b588 Compare November 1, 2023 17:38
@glennmoy glennmoy force-pushed the gm/release_followups branch from 439b588 to de45f66 Compare November 1, 2023 17:41
@glennmoy
Copy link
Contributor Author

glennmoy commented Nov 1, 2023

Ok I'm calling this a win

Screenshot 2023-11-01 at 17 53 01

@glennmoy glennmoy requested a review from omus November 1, 2023 18:14
Project.toml Outdated Show resolved Hide resolved
@glennmoy glennmoy added the fix fixes a bug or documentation label Nov 2, 2023
@kleinschmidt kleinschmidt linked an issue Nov 2, 2023 that may be closed by this pull request
Copy link
Member

@omus omus left a comment

Choose a reason for hiding this comment

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

One last thing

id: project_toml
shell: julia --color=yes --project {0}
env:
LATEST_TAG: ${{ steps.latest_tag.outputs.tag }}
run: |
using Pkg.Types
project = read_project("Project.toml")
latest_tag = parse(VersionNumber, ENV["LATEST_TAG"])
tags = parse.(VersionNumber, split(readchomp(`git tag -l`), "\n"))
Copy link
Member

@omus omus Nov 6, 2023

Choose a reason for hiding this comment

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

If we create a tag that isn't a version number this will break. We should do:

Suggested change
tags = parse.(VersionNumber, split(readchomp(`git tag -l`), "\n"))
tags = split(readchomp(`git tag -l`), "\n")

and do a string comparison later.

Also, we can simplify this to:

Suggested change
tags = parse.(VersionNumber, split(readchomp(`git tag -l`), "\n"))
tags = readlines(`git tag -l`)

.github/workflows/Pre_release.yml Outdated Show resolved Hide resolved
@glennmoy glennmoy force-pushed the gm/release_followups branch from f51d8a0 to a8bf476 Compare November 7, 2023 14:03
@glennmoy glennmoy merged commit aaef10a into main Nov 7, 2023
1 check passed
@glennmoy glennmoy deleted the gm/release_followups branch November 7, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix fixes a bug or documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stable documentation is updated with pre-releases
2 participants