A collection of reusable GitHub Actions for automating your workflows.
Use only one workflow file to automate your entire test and release process.
- 🦋 Powered by Changesets: Seamless use this action if the project uses changesets.
- 🛡️ NPM Provenance: Ensures secure and verifiable releases.
- 📦 Package Manager Support: Supports
npm
,pnpm
, andyarn
. - 🛠️ Customizable Scripts: Allows defining custom scripts for testing and publishing in your
package.json
. - 🔐 Secret Management: Simplifies secret management through environment variables.
Specify a compatible Node.js version by engines
and define test
and release
scripts in your package.json
. Example:
{
"engines": {
"node": ">=22.0.0"
},
"scripts": {
"test": "echo 'pass'", // Replace with your actual test script
"release": "pnpm -r publish" // Replace with your actual publish script
}
}
Create a repository secret named TOKENS
in your GitHub repository settings under Settings > Secrets > Actions
. This should be a JSON string where each key-value pair becomes an environment variable during the release process. Example:
{
"NPM_TOKEN": "your_npm_token",
"DOCKERHUB_TOKEN": "your_dockerhub_token"
}
Add a workflow file in .github/workflows/
. Example configuration:
name: CI
on:
- push
- pull_request
jobs:
ci:
permissions:
contents: write
id-token: write
pull-requests: write
uses: zanminkian/github-actions/.github/workflows/all-in-one.yml@v3
secrets:
TOKENS: ${{ secrets.TOKENS }}
Commit the workflow file and push it to the default branch. Each push will trigger the test process, while only pushes to the main
and prerelease
branch may trigger the release process.
- Git Status Not Clean: Ensure all changes are committed before running the workflow.
- Missing Secrets: Verify that the
TOKENS
secret is correctly set in your repository settings. - Incompatible Node.js Version: Update the
engines.node
field in yourpackage.json
.
- fenge: A TypeScript project publishing to npm.
- @rnm/tscx: A wrapper around
tsc
. - web-ide: A project publishing to Docker Hub.
MIT