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

feat: add new release workflow with automated release publishing #242

Merged
merged 70 commits into from Mar 18, 2020

Conversation

@derberg
Copy link
Member

derberg commented Mar 6, 2020

Fixes: #225
See also: #220

  • This PR introduces conventional commits and a short cheat sheet to follow for those that are new to this specification

  • there is now a separate contribution guide that explains how PR titles should look like

  • PR template with info about contribution guide and PR description structure

  • makefile and release.sh removed, docker build added to npm script and rest moved to github action. We no longer use custom docker image for extracting npm version, but we do it in a "npm native way", look into new special script for it

  • New workflow is very descriptive now and all clear what is happening
    Screenshot 2020-03-13 at 17 44 37

  • Once we successfully release to NPM, nice GitHub release is added:
    Screenshot 2020-03-06 at 23 55 24

  • Also bump in package.json is done and change commit by bot. Keep in mind that because of branch protection it is not direct commit, but branch -> pull request -> automerge flow
    Screenshot 2020-03-06 at 23 27 19

  • npm and github publishing is done with support of semantic-release and its plugins that are configured explicitly for conventional commits. If commit message is not feat or fix or has no ! then no release is triggered

  • if you will make sure that title of PR is ok, then you can easily squash then as squash&marge will take PR title as commit message

What failed in this task:

  • I wanted to have automated PR title validation that could be a required check on a PR. Unfortunately the only, good enough actions that are out there are not a good fit for "fork" flow because they both do POST operations on the API, and it won't work actions/labeler#12 (comment). Only custom basic Action could work that I would have to write from scratch, but imho this is to much for this task
  • I wanted to have automated merging of PR through adding a label to the PR but it can't work on forks for the same reason as above mentioned :( automerging for all PRs, where only you as maintainer have rights to label PR automerge and it is merged, so even maintainers do not have to have write access to repo. Anyway, that failed because of GH actions limitation

Release flow diagram:
Automated release pipeline(1)

derberg added 30 commits Mar 4, 2020
update master
fix: change config of automerge
@derberg derberg changed the title chore: add new release workflow chore: add new release workflow with automated release publishing Mar 6, 2020
derberg added 2 commits Mar 6, 2020
derberg added 3 commits Mar 13, 2020
Copy link
Member

jonaslagoni left a comment

Just a small question, otherwise looks good 😄

@@ -1,5 +1,5 @@
{
"name": "asyncapi-generator",
"name": "@asyncapi/asyncapi-generator",

This comment has been minimized.

Copy link
@jonaslagoni

jonaslagoni Mar 16, 2020

Member

Now that we are changing the name shouldn't the name just be @asyncapi/generator ? 🤔

This comment has been minimized.

Copy link
@fmvilas

fmvilas Mar 16, 2020

Member

Yup, agree with @jonaslagoni. Also, we need to make it clear what happens with the package asyncapi-generator. Should we leave this change for another PR?

This comment has been minimized.

Copy link
@derberg

derberg Mar 16, 2020

Author Member

yeap, makes a lot of sense, good 👁 @jonaslagoni

@fmvilas not much to do here, in my opinion, once we merge this PR and @asyncapi/generator gets published, we should deprecate asyncapi-generator with clear message what is the new one and that we do not do versioning from the very beginning but continue, something like https://www.npmjs.com/package/babel

This comment has been minimized.

Copy link
@fmvilas

fmvilas Mar 16, 2020

Member

Ok, as far as you don't forget to deprecate the current package, everything is fine :)

Let's also put it in the newsletter and make sure @evamorcillo communicates it on social networks too.

This comment has been minimized.

Copy link
@derberg

derberg Mar 16, 2020

Author Member

I anyway want to clearly explain tomorrow during community call how automated flow will look like, and what changes it brings, so it is better to understand for all and we can share details easily by sharing a link to the recording

This comment has been minimized.

Copy link
@fmvilas

fmvilas Mar 16, 2020

Member

That's a great idea 👍

@derberg

This comment has been minimized.

Copy link
Member Author

derberg commented Mar 16, 2020

@fmvilas @jonaslagoni version changed, conflicts solved

@derberg derberg mentioned this pull request Mar 16, 2020
Copy link
Member

jonaslagoni left a comment

👍

@derberg derberg changed the title chore: add new release workflow with automated release publishing feat: add new release workflow with automated release publishing Mar 16, 2020
if: steps.initversion.outputs.version != steps.extractver.outputs.version
run: |
echo ${{secrets.DOCKER_PASSWORD}} | docker login -u ${{secrets.DOCKER_USERNAME}} --password-stdin
npm run docker-build

This comment has been minimized.

Copy link
@RobertDiebels

RobertDiebels Mar 18, 2020

Just wanted to re-iterate that for the docker build I did not mean we should use npm to run it [ https://github.com//issues/220#issuecomment-589755835 ].

This comment has been minimized.

Copy link
@derberg

derberg Mar 18, 2020

Author Member

Yeap I know, but I created this npm script for build as par my comment #220 (comment) because docker build part is useful on local development. So better have one script for that for local and CI

Copy link
Member

fmvilas left a comment

:shipit: 💪

@derberg

This comment has been minimized.

Copy link
Member Author

derberg commented Mar 18, 2020

ok, keep fingers crossed so after merge nothing 💥

  • secrets checked, they are defined in a repo with technical bot
  • docker is configured to go to asyncapi account
  • npm goes to new @asyncapi/generator

I merge and if all goes well, we should get a 0.34.0 automatically released 🤞

@derberg derberg merged commit 4d24022 into asyncapi:master Mar 18, 2020
17 checks passed
17 checks passed
autoapprove
Details
autoapprove
Details
autoapprove
Details
autoapprove
Details
autoapprove
Details
autoapprove
Details
autoapprove
Details
autoapprove
Details
automerge
Details
automerge
Details
automerge
Details
automerge
Details
automerge
Details
automerge
Details
automerge
Details
automerge
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@asyncapi-bot

This comment has been minimized.

Copy link
Contributor

asyncapi-bot commented Mar 18, 2020

🎉 This PR is included in version 0.34.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants
You can’t perform that action at this time.