Skip to content

Add shared release workflow from reissue#126

Merged
cseeman merged 1 commit intomainfrom
add-shared-release-workflow
Feb 2, 2026
Merged

Add shared release workflow from reissue#126
cseeman merged 1 commit intomainfrom
add-shared-release-workflow

Conversation

@cseeman
Copy link
Contributor

@cseeman cseeman commented Jan 30, 2026

Summary

  • Adds shared release workflow from reissue for trusted publishing to RubyGems.org

Business Justification

Standardizes gem release process across SOFware repos using the shared reissue workflow, enabling automated trusted publishing to RubyGems.org via workflow_dispatch.

Technical Details

Adds .github/workflows/release.yml that calls SOFware/reissue/.github/workflows/shared-ruby-gem-release.yml@main

@cseeman cseeman force-pushed the add-shared-release-workflow branch 2 times, most recently from fee11a7 to 6b691b3 Compare January 30, 2026 22:43
@cseeman
Copy link
Contributor Author

cseeman commented Jan 30, 2026

Added on RubyGems Trusted Publishers
GitHub Repository: SOFware/close_encounters
Workflow Filename: shared-ruby-gem-release.yml
Workflow Repository: SOFware/reissue

@cseeman cseeman marked this pull request as ready for review January 30, 2026 23:00
@cseeman cseeman requested a review from a team as a code owner January 30, 2026 23:00
Switch to using the shared gem release flow from reissue
for trusted publishing to RubyGems.org.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cseeman cseeman force-pushed the add-shared-release-workflow branch from 6b691b3 to 3e5f880 Compare February 2, 2026 18:03
Comment on lines +8 to +12
uses: SOFware/reissue/.github/workflows/shared-ruby-gem-release.yml@main
with:
git_user_email: 'gems@sofwarellc.com'
git_user_name: 'SOFware'
ruby_version: '3.4'

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI about 2 months ago

In general, the fix is to explicitly specify a permissions block for the workflow or for the release job so the GITHUB_TOKEN is not implicitly granted broad repository defaults. Since this workflow only delegates to a reusable workflow via uses:, the safest, non‑breaking approach is to define minimal permissions at the job level, letting the reusable workflow request any additional fine-grained permissions it truly needs (if it does so). As a conservative baseline consistent with GitHub’s recommendations, we can grant read-only access to repository contents (and nothing else) in this caller workflow.

Concretely, in .github/workflows/release.yml, within the jobs: section, add a permissions: block under the release job (i.e., at the same indentation level as uses:) with contents: read. This ensures that the release job’s GITHUB_TOKEN is limited unless the called workflow itself defines additional permissions. No imports or external methods are needed; this is a pure YAML configuration change. The only lines to change are around the release job definition, inserting the new permissions block without modifying the existing uses or with configuration.

Suggested changeset 1
.github/workflows/release.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -5,6 +5,8 @@
 
 jobs:
   release:
+    permissions:
+      contents: read
     uses: SOFware/reissue/.github/workflows/shared-ruby-gem-release.yml@main
     with:
       git_user_email: 'gems@sofwarellc.com'
EOF
@@ -5,6 +5,8 @@

jobs:
release:
permissions:
contents: read
uses: SOFware/reissue/.github/workflows/shared-ruby-gem-release.yml@main
with:
git_user_email: 'gems@sofwarellc.com'
Copilot is powered by AI and may make mistakes. Always verify output.
@cseeman cseeman merged commit fee9fd8 into main Feb 2, 2026
7 checks passed
@cseeman cseeman deleted the add-shared-release-workflow branch February 2, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants