Skip to content

Commit f5bcdd8

Browse files
committed
ci: simplify for attestation-only releases (no draft needed)
Since actions/attest@v4 stores attestations via GitHub's attestation API (not as release assets), repos that only use attestation don't need draft releases. Release-please can publish the release directly. Changes: - Remove draft:true from release-please-config.json - Remove create-tag job/steps (force-tag-creation handles this) - Remove publish-release job (release is published directly) - Remove publish_release input from manual workflows
1 parent 018d5ad commit f5bcdd8

3 files changed

Lines changed: 0 additions & 51 deletions

File tree

.github/workflows/manual-publish.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ on:
66
description: "Is this a dry run. If so no package will be published."
77
type: boolean
88
required: true
9-
publish_release:
10-
description: "Whether to publish (un-draft) the release after uploading artifacts."
11-
type: boolean
12-
default: true
139

1410
jobs:
1511
build-ruby-gem:
@@ -73,18 +69,3 @@ jobs:
7369
uses: actions/attest@v4
7470
with:
7571
subject-checksums: checksums.txt
76-
77-
publish-release:
78-
needs: ['publish']
79-
if: ${{ !inputs.dry_run && inputs.publish_release }}
80-
runs-on: ubuntu-latest
81-
permissions:
82-
contents: write
83-
steps:
84-
- name: Publish release
85-
env:
86-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87-
run: >
88-
gh release edit "$(gh release list --repo ${{ github.repository }} --limit 1 --json tagName --jq '.[0].tagName')"
89-
--repo ${{ github.repository }}
90-
--draft=false

.github/workflows/release-please.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,6 @@ jobs:
5353
with:
5454
fetch-depth: 0
5555

56-
- name: Create release tag
57-
env:
58-
TAG_NAME: ${{ needs.release-package.outputs.upload-tag-name }}
59-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60-
run: |
61-
if gh api "repos/${{ github.repository }}/git/ref/tags/${TAG_NAME}" >/dev/null 2>&1; then
62-
echo "Tag ${TAG_NAME} already exists, skipping creation."
63-
else
64-
echo "Creating tag ${TAG_NAME}."
65-
git config user.name "github-actions[bot]"
66-
git config user.email "github-actions[bot]@users.noreply.github.com"
67-
git tag "${TAG_NAME}"
68-
git push origin "${TAG_NAME}"
69-
fi
70-
7156
- uses: ./.github/actions/setup
7257
with:
7358
version: "3.2"
@@ -100,19 +85,3 @@ jobs:
10085
uses: actions/attest@v4
10186
with:
10287
subject-checksums: checksums.txt
103-
104-
publish-release:
105-
needs: ['release-package', 'publish']
106-
if: ${{ needs.release-package.outputs.release-created == 'true' }}
107-
runs-on: ubuntu-latest
108-
permissions:
109-
contents: write
110-
steps:
111-
- name: Publish release
112-
env:
113-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114-
TAG_NAME: ${{ needs.release-package.outputs.upload-tag-name }}
115-
run: >
116-
gh release edit "$TAG_NAME"
117-
--repo ${{ github.repository }}
118-
--draft=false

release-please-config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"release-type": "ruby",
55
"bump-minor-pre-major": true,
66
"versioning": "default",
7-
"draft": true,
87
"force-tag-creation": true,
98
"include-component-in-tag": false,
109
"include-v-in-tag": false,

0 commit comments

Comments
 (0)