@@ -14,6 +14,8 @@ permissions:
1414jobs :
1515 release :
1616 runs-on : ubuntu-latest
17+ outputs :
18+ marketplace-ready : ${{ steps.marketplace-check.outputs.marketplace-ready }}
1719
1820 steps :
1921 - name : Checkout repository
@@ -122,32 +124,41 @@ jobs:
122124 --latest
123125
124126 - name : Validate Marketplace Requirements
127+ id : marketplace-check
125128 run : |
126129 echo "🔍 Validating GitHub Marketplace requirements..."
127130
128131 # Check if repository is public
129132 REPO_VISIBILITY=$(gh repo view ${{ github.repository }} --json visibility --jq '.visibility')
130133 if [ "$REPO_VISIBILITY" != "public" ]; then
131- echo "❌ Repository must be public for marketplace publication"
132- echo " Go to Settings → Change repository visibility → Make public"
133- exit 1
134+ echo "⚠️ Repository is private - marketplace publication not possible"
135+ echo "📝 To publish to GitHub Marketplace:"
136+ echo " 1. Go to Settings → General → Change repository visibility"
137+ echo " 2. Click 'Change visibility' → 'Make public'"
138+ echo " 3. Re-run the release workflow after making it public"
139+ echo ""
140+ echo "🔄 Continuing with private repository release..."
141+ MARKETPLACE_READY=false
142+ else
143+ echo "✅ Repository is public"
144+ MARKETPLACE_READY=true
134145 fi
135- echo "✅ Repository is public"
136146
137147 # Check action.yml branding
138148 if grep -q "branding:" action.yml && grep -q "icon:" action.yml && grep -q "color:" action.yml; then
139149 echo "✅ action.yml has proper branding configuration"
140150 else
141- echo "❌ action.yml missing branding configuration"
142- exit 1
151+ echo "⚠️ action.yml missing branding configuration"
152+ echo " Add branding section to action.yml for marketplace publication"
153+ MARKETPLACE_READY=false
143154 fi
144155
145156 # Check README exists and has content
146157 if [ -f README.md ] && [ -s README.md ]; then
147158 echo "✅ README.md exists and has content"
148159 else
149- echo "❌ README.md missing or empty"
150- exit 1
160+ echo "⚠️ README.md missing or empty"
161+ MARKETPLACE_READY=false
151162 fi
152163
153164 # Check for usage examples in README
@@ -157,7 +168,16 @@ jobs:
157168 echo "⚠️ README should include usage examples"
158169 fi
159170
160- echo "🎯 Marketplace requirements validation complete!"
171+ # Set marketplace readiness status
172+ if [ "$MARKETPLACE_READY" = "true" ]; then
173+ echo "🎯 Marketplace requirements validation complete - Ready for publication!"
174+ echo "MARKETPLACE_READY=true" >> $GITHUB_ENV
175+ echo "marketplace-ready=true" >> $GITHUB_OUTPUT
176+ else
177+ echo "⚠️ Marketplace requirements not fully met - Release will continue without marketplace publication"
178+ echo "MARKETPLACE_READY=false" >> $GITHUB_ENV
179+ echo "marketplace-ready=false" >> $GITHUB_OUTPUT
180+ fi
161181 env :
162182 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
163183
@@ -187,35 +207,48 @@ jobs:
187207 echo "✅ Marketplace metadata prepared"
188208 cat marketplace-metadata.json
189209
190- - name : Auto-Open Marketplace Publication
210+ - name : Marketplace Publication Info
191211 run : |
192- echo "🚀 Opening marketplace publication page..."
193- echo ""
194212 echo "🎉 Release created successfully!"
195213 echo "📦 Version: ${{ steps.version.outputs.version }}"
196214 echo "🔗 Release URL: https://github.com/${{ github.repository }}/releases/tag/${{ steps.version.outputs.version }}"
197215 echo ""
198- echo "🏪 MARKETPLACE PUBLICATION:"
199- echo " 📋 All requirements validated ✅"
200- echo " 🔗 Publication URL: https://github.com/${{ github.repository }}/releases/tag/${{ steps.version.outputs.version }}"
201- echo ""
202- echo "📝 To complete marketplace publication:"
203- echo " 1. 🌐 Go to: https://github.com/${{ github.repository }}"
204- echo " 2. 📦 Look for 'Publish this Action to the GitHub Marketplace' banner"
205- echo " 3. 🖱️ Click the banner or go to the Releases tab"
206- echo " 4. ✏️ Fill in the marketplace form with suggested details:"
207- echo " - Name: SSH Remote Script Executor"
208- echo " - Description: Execute scripts on remote hosts via SSH"
209- echo " - Categories: Deployment, Utilities"
210- echo " - Tags: ssh, remote, deployment, scripts, automation"
211- echo " 5. 📤 Submit for publication"
212- echo ""
213- echo "🎯 The action will be reviewed and published to GitHub Marketplace!"
214- echo "📊 View release: https://github.com/${{ github.repository }}/releases/tag/${{ steps.version.outputs.version }}"
215216
216- # Try to open the marketplace page (this works in some environments)
217- echo "🔗 Attempting to open marketplace publication page..."
218- gh repo view ${{ github.repository }} --web || echo " Manual navigation required"
217+ if [ "$MARKETPLACE_READY" = "true" ]; then
218+ echo "🏪 MARKETPLACE PUBLICATION:"
219+ echo " 📋 All requirements validated ✅"
220+ echo " 🔗 Publication URL: https://github.com/${{ github.repository }}/releases/tag/${{ steps.version.outputs.version }}"
221+ echo ""
222+ echo "📝 To complete marketplace publication:"
223+ echo " 1. 🌐 Go to: https://github.com/${{ github.repository }}"
224+ echo " 2. 📦 Look for 'Publish this Action to the GitHub Marketplace' banner"
225+ echo " 3. 🖱️ Click the banner or go to the Releases tab"
226+ echo " 4. ✏️ Fill in the marketplace form with suggested details:"
227+ echo " - Name: SSH Remote Script Executor"
228+ echo " - Description: Execute scripts on remote hosts via SSH"
229+ echo " - Categories: Deployment, Utilities"
230+ echo " - Tags: ssh, remote, deployment, scripts, automation"
231+ echo " 5. 📤 Submit for publication"
232+ echo ""
233+ echo "🎯 The action will be reviewed and published to GitHub Marketplace!"
234+
235+ # Try to open the marketplace page (this works in some environments)
236+ echo "🔗 Attempting to open marketplace publication page..."
237+ gh repo view ${{ github.repository }} --web || echo " Manual navigation required"
238+ else
239+ echo "⚠️ MARKETPLACE PUBLICATION NOT AVAILABLE:"
240+ echo " 📋 Repository requirements not met"
241+ echo ""
242+ echo "📝 To enable marketplace publication:"
243+ echo " 1. 🌐 Make repository public: Settings → Change repository visibility → Make public"
244+ echo " 2. ✅ Ensure action.yml has branding configuration"
245+ echo " 3. 📖 Add comprehensive README with usage examples"
246+ echo " 4. 🔄 Create a new release after meeting requirements"
247+ echo ""
248+ echo "🎯 Release completed successfully (private repository)"
249+ fi
250+
251+ echo "📊 View release: https://github.com/${{ github.repository }}/releases/tag/${{ steps.version.outputs.version }}"
219252 env :
220253 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
221254
@@ -268,7 +301,7 @@ jobs:
268301 create-marketplace-issue :
269302 runs-on : ubuntu-latest
270303 needs : [release, update-major-tag]
271- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
304+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && needs.release.outputs.marketplace-ready == 'true'
272305
273306 permissions :
274307 contents : write
0 commit comments