فهرست منبع

ci: comment on resolved issues via semantic-release github plugin (#1138)

James Read 12 ساعت پیش
والد
کامیت
9ce8b0ef12
2فایلهای تغییر یافته به همراه13 افزوده شده و 0 حذف شده
  1. 4 0
      .goreleaser.yml
  2. 9 0
      .releaserc.yaml

+ 4 - 0
.goreleaser.yml

@@ -230,6 +230,10 @@ notarize:
 release:
   # Publish immediately without Windows assets; sign-windows uploads signed zip/MSI later.
   draft: false
+  # semantic-release's github plugin creates a draft release first (for issue comments);
+  # adopt it and replace its placeholder notes rather than creating a second release.
+  use_existing_draft: true
+  mode: replace
   ids:
     - default
     - openrc

+ 9 - 0
.releaserc.yaml

@@ -6,6 +6,15 @@ branches:
 
 plugins:
   - '@semantic-release/commit-analyzer'
+  # Only a draft is created here; GoReleaser adopts it (release.use_existing_draft),
+  # replaces the notes and publishes it. This plugin's job is the success comments on
+  # resolved issues/PRs, and opening an issue when a release fails.
+  - - '@semantic-release/github'
+    - draftRelease: true
+      releaseBodyTemplate: 'Release notes are generated by GoReleaser.'
+      successComment: >-
+        This is included in OliveTin
+        [<%= nextRelease.version %>](https://github.com/OliveTin/OliveTin/releases/tag/<%= nextRelease.version %>) :tada:
   - '@semantic-release/git'
   - - "@semantic-release/exec"
     - publishCmd: |