如何在 GitHub 上发布带有语义发布的版本?

How to publish a release with semantic-release on GitHub?

我正在尝试使用语义发布发布我的版本。一切都运行良好,但到目前为止该工具仅生成标签而不是实际的 GitHub 发布。

我的.releaserc

{
  "branches": "main",
  "plugins": [
    [
      "@semantic-release/npm",
      {
        "npmPublish": false
      }
    ],
    [
      "@semantic-release/commit-analyzer",
      {
        "releaseRules": [
          {
            "message": "CHANGE-*",
            "release": "patch"
          }
        ]
      }
    ],
    "@semantic-release/release-notes-generator"
  ]
}

和我的release.yaml

name: Create Release

on:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Setup Node.js environment
        uses: actions/setup-node@v2.5.1

      - name: Env-Variables
        run: |
          echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID_NONPROD }}"  >> $GITHUB_ENV
          echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY_NONPROD }}" >> $GITHUB_ENV
          echo "GH_TOKEN=${{ secrets.SERVICE_TEAM_USER_TOKEN }}" >> $GITHUB_ENV
          export GH_TOKEN=${{ secrets.SERVICE_TEAM_USER_TOKEN }}

      - name: NPM Install
        run: |
          npm i
          npm i -g semantic-release

      - name: Create Release
        run: |
          semantic-release

如何让 semantic-release 生成 github 版本而不是标签?

正如 jonrsharpe 指出的那样,实施插件 semantic-release/github 解决了我的问题,现在自动创建标签和版本。