1.5 KiB
1.5 KiB
@lilith Reusable Workflows
Central repository for Forgejo Actions reusable workflows.
Available Workflows
publish-npm.yml
For TypeScript/JavaScript packages published to Forgejo npm registry.
name: Publish
on: [push, workflow_dispatch]
jobs:
publish:
uses: lilith/workflows/.forgejo/workflows/publish-npm.yml@main
secrets: inherit
Inputs:
node-version(default:22)pnpm-version(default:9)skip-validation(default:false)
Required package.json metadata:
{
"_": {
"registry": "forgejo",
"publish": true,
"build": true
}
}
publish-pypi.yml
For Python packages published to Forgejo PyPI registry.
name: Publish
on: [push, workflow_dispatch]
jobs:
publish:
uses: lilith/workflows/.forgejo/workflows/publish-pypi.yml@main
secrets: inherit
Inputs:
python-version(default:3.12)run-tests(default:true)
Required Secrets
Configure these in your Forgejo organization settings:
NPM_TOKEN- Forgejo npm registry tokenPYPI_TOKEN- Forgejo PyPI registry token
Migration
To migrate from full workflows to reusable:
Before (150+ lines):
name: Build and Publish
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
# ... 150+ lines
After (5 lines):
name: Publish
on: [push, workflow_dispatch]
jobs:
publish:
uses: lilith/workflows/.forgejo/workflows/publish-npm.yml@main
secrets: inherit