GitHub Actions Certification
Custom Actions
Sharing Custom Actions
In this article, we’ll publish our JavaScript action to the GitHub Marketplace. You’ll complete each required step: accepting terms, enabling two-factor authentication (2FA), updating the action metadata, and finally releasing your action.
First, open your repository to confirm the action you plan to share. Here’s our public js-action-pr-giphy-comment repository with no releases yet:
Step 1: Start a New Release
- Navigate to the Releases tab and click Create a new release.
- Scroll down to review and accept the Marketplace terms.
Note
Publishing to the GitHub Marketplace requires two-factor authentication (2FA). If prompted, enable 2FA in your GitHub account settings and refresh the page.
- GitHub will check that your action’s
name
is unique. If it’s already taken, you’ll see an alert:
Step 2: Update Your Metadata (action.yml
)
Edit your action.yml
(or action.yaml
) to ensure you have a unique name
and include all required fields:
name: 'KodeKloud Giphy PR Comment'
description: 'Automatically add a Giphy GIF comment to new pull requests.'
inputs:
github-token:
description: 'GitHub token with repo access'
required: true
giphy-api-key:
description: 'Your Giphy API key'
required: true
runs:
using: 'node20'
main: 'dist/index.js'
branding:
icon: 'award'
color: 'green'
Now commit and push your changes:
git add action.yml
git commit -m "chore: update action metadata and branding"
git push origin main
Step 3: Finalize and Publish the Release
Retry creating the release:
- Click Create a new release again.
- Accept the Marketplace terms.
- Confirm all checklist items turn green before proceeding.
Fill in the release details:
Field | Example |
---|---|
Tag version | v1.0.0-alpha |
Target branch | main |
Release title | Alpha Release |
Release notes | This is a demo action for PR GIF comments. |
Publish your release. Once complete, you’ll see download options and your new Marketplace URL.
Step 4: Verify in the Marketplace
Visit the Marketplace URL to ensure your action is live and discoverable:
Next Steps
Enhance your README.md
with detailed usage examples and workflow snippets. Then, consumers can use your action like this:
steps:
- uses: kodekloud/[email protected]
with:
github-token: \${{ secrets.GITHUB_TOKEN }}
giphy-api-key: \${{ secrets.GIPHY_API_KEY }}
That’s it! Your JavaScript GitHub Action is now published on the Marketplace and ready for users worldwide.
Links and References
Watch Video
Watch video content