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

What to do to switch to new release configuration - JS/TS projects #205

Open
derberg opened this issue Jan 18, 2023 · 2 comments
Open

What to do to switch to new release configuration - JS/TS projects #205

derberg opened this issue Jan 18, 2023 · 2 comments
Labels
enhancement New feature or request stale

Comments

@derberg
Copy link
Member

derberg commented Jan 18, 2023

Writing this issue to have instruction stored somewhere. I guess best would be to put it as separate issue in all repositories and mark those as good-first-issue - something to think about 🤔

What to do in a project to enable releases for the first time

  • Add the following topics to your repository:
    • get-global-node-release-workflows: thanks to this topic your repository will be populated with the following GitHub Action workflows:
      • workflow responsible for the release
      • workflow that will bump version in package.json in the repo, after release
      • workflow that will bump your new package version in all the other asyncapi repositories that use your package
    • get-global-releaserc: thanks to this topic your repository will be populated with generic .releaserc for the semantic-release package. It is recommended to use this generic configuration and if you have some other needs, like docker release or some others, just use different workflows. You can opt-out from this generic configuration, not add this specific topic to the repository, and create your own configuration using semantic-release configuration guide.
  • By default first release of the package will be 1.0.0 as this is the best practice. If you prefer to start with minor releases first and are afraid to release major release first, you need to create the first 0.0.1 release in GitHub manually
  • Make sure that package name in package.json starts with @asyncapi/ to make sure it is published under proper location in NPM
  • Add the following property to package.json:
      "publishConfig": {
        "access": "public"
      }
  • Add the following script to package.json:
    "bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION"
    
  • Make sure bots team has Maintain role in the repository
    Screenshot 2023-01-18 at 10 21 20
  • Familiarize with Conventional Commits specification. Now you need to use it in your pull request titles as release process is based on it. Only specific commit prefix can trigger release, like fix: , feat: or feat!:

Now ask maintainers of .github repo to go to https://github.com/asyncapi/.github/actions/workflows/global-replicator.yml and run the workflow manually for your repo

What to do in a project that already had releases but the "old-way"

If you do not follow below steps, and do not perform below changes, current release-related workflows that you already have in repo will not get any future updates/improvements from the central .github repository, including security updates.

  • Add the following topics to your repository to get updated workflows:
    • get-global-node-release-workflows: thanks to this topic your repository will start receiving again the following GitHub Action workflows:
      • workflow responsible for the release
      • workflow that will bump version in package.json in the repo, after release
      • workflow that will bump your new package version in all the other asyncapi repositories that use your package
    • get-global-releaserc: thanks to this topic your repository will be populated with generic .releaserc for the semantic-release package. It is recommended to use this generic configuration and if you have some other needs, like docker release or some others, just use different workflows. You can opt-out from this generic configuration, not add this specific topic to the repository, and create your own configuration using semantic-release configuration guide.
  • Cleanup package.json from the following:
    • script "release": "semantic-release" is no longer needed, as the package is now run directly with npx
    • the following devDependencies can be removed as they are installed through the GitHub Action workflow:
      • @semantic-release/commit-analyzer
      • @semantic-release/github
      • @semantic-release/npm
      • @semantic-release/release-notes-generator
      • conventional-changelog-conventionalcommits
      • semantic-release
    • remove release property responsible for release configuration.

Now ask maintainers of .github repo to go to https://github.com/asyncapi/.github/actions/workflows/global-replicator.yml and run the workflow manually for your repo

@derberg
Copy link
Member Author

derberg commented Mar 30, 2023

followed instructions in asyncapi/openapi-schema-parser#170 and it worked well

This was referenced May 30, 2023
This was referenced May 30, 2023
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

1 participant