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

Separated release and publish CI step #31

Merged
merged 5 commits into from
Jun 6, 2024

Conversation

albertmoravec
Copy link
Contributor

@albertmoravec albertmoravec commented Apr 6, 2024

Separated release and publish CI pipeline into two steps:

  • release - runs on every commit to master, except for chore(release) commits done by semantic-release
  • publish - runs on every version tag push

Release is now entirely handled by semantic-release. New version is calculated, changelog is generated, pubspec.yaml updated, new version tag is pushed and finally a Github release is created.

To trigger the publish pipeline from another Github Action (in this case the release action), the version tag push must be done using PAT (personal access token) of a user, not using the pipeline token. The release pipeline expects secrets.RELEASE_PAT to be present.

Copy link
Member

@marianhlavac marianhlavac left a comment

Choose a reason for hiding this comment

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

I'm not sure if this will work, have you checked it's working?

.github/workflows/publish.yml Outdated Show resolved Hide resolved
@albertmoravec
Copy link
Contributor Author

Seems like I managed to fully automate the release process. Updated the PR description accordingly, please check again.

Copy link
Member

@marianhlavac marianhlavac left a comment

Choose a reason for hiding this comment

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

Hip-hip-hurray! 🙌 The best way to test this is to merge it and release a new version, so let's try it.

@albertmoravec albertmoravec merged commit df42aa8 into master Jun 6, 2024
1 check passed
@albertmoravec albertmoravec deleted the ci/DT-2605-pubdev-publish branch June 6, 2024 17:09
albertmoravec added a commit that referenced this pull request Jun 11, 2024
Release and update steps were separated into separate pipelines to automate publishing process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants