Skip to content

Update release process to use actions #392

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

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

CaseyHillers
Copy link
Collaborator

@CaseyHillers CaseyHillers commented Nov 27, 2023

  • When a PR is merged, it will create a tag based on the version in the pubspec.yaml
    • If it already exists, skip

What is changing

  • Humans will need to update the pubspec.yaml and CHANGELOG on relevant PRs
    • I don't think this is a large issue given the traffic of this repo, but if needed, we can re-evaluate generating these on merges
  • Humans don't need to add semver labels or the unreleased labels
  • @robrbecker no longer needs to run the release script :-)

Manual work required before landing

  • Update pub.dev settings to publish when new tags are created
  • Create RELEASE_TOKEN

Future work

  • Verify there's a CHANGELOG entry when the pubspec version updates
  • Require pubspec versions to be incremented, can be opt-ed out with a label (no-changelog-needed)

@CaseyHillers
Copy link
Collaborator Author

@robrbecker can you take a look? No rush on this, but I'm curious if you're open to this approach.

Copy link
Member

@robrbecker robrbecker left a comment

Choose a reason for hiding this comment

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

Overall looks like a decent approach. Given that the auto-everything approach never seemed to live up to my expectations and kept breaking, maybe this simpler approach will be more reliable.
Take a look at my comments and if there are no changes needed, let me know and I'll approve.

- name: Create a Release
uses: elgohr/Github-Release-Action@v5
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice catch! It will. I changed it back to RELEASE_TOKEN

env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
title: ${{ github.ref }}
Copy link
Member

Choose a reason for hiding this comment

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

It's unclear if this action uses the github autogenerated release notes or not. It'll be a little bit of a shame to lose that, but I can live without it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

By default, GitHub generates the release notes based on the commit log between the two refs. If we want, we can follow up by tweaking release.yml to get the format we want.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good to me


jobs:
publish:
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
Copy link
Member

Choose a reason for hiding this comment

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

Won't we still need this to publish the github release automatically?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, good point. I thought pub dev scraped for tags. I added the dedicated action from https://dart.dev/tools/pub/automated-publishing#configuring-automated-publishing-from-github-actions-on-pubdev

@CaseyHillers CaseyHillers marked this pull request as ready for review November 28, 2023 19:49
Copy link
Member

@robrbecker robrbecker left a comment

Choose a reason for hiding this comment

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

Let's give it a try

@robrbecker robrbecker merged commit 52f71de into SpinlockLabs:master Nov 29, 2023
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy