Publish packages to Buddy CI/CD platform from GitHub Actions workflows.
- Publish packages directly from GitHub Actions
- Support for versioned packages (package@version)
- Create packages automatically if they don't exist
- Force overwrite existing versions
- Region support (EU, US, AP)
name: Publish
on: [push]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Buddy
uses: buddy/login@v1
with:
token: ${{ secrets.BUDDY_TOKEN }}
region: 'US'
- name: Publish package
uses: buddy/publish-package@v1
with:
workspace: my-workspace
project: my-project
identifier: my-package
directory: ./dist- name: Publish versioned package
uses: buddy/publish-package@v1
with:
workspace: my-workspace
project: my-project
identifier: my-package@1.0.0
directory: ./dist- name: Publish package (create if missing)
uses: buddy/publish-package@v1
with:
workspace: my-workspace
project: my-project
identifier: my-package@1.0.0
directory: ./dist
create: true- name: Publish package (force overwrite)
uses: buddy/publish-package@v1
with:
workspace: my-workspace
project: my-project
identifier: my-package@1.0.0
directory: ./dist
force: true- name: Publish to specific region
uses: buddy/publish-package@v1
with:
workspace: my-workspace
project: my-project
identifier: my-package
directory: ./dist
region: AP # EU, US, or AP| Input | Required | Description |
|---|---|---|
workspace |
Yes | Buddy workspace domain |
project |
Yes | Buddy project name (URL handle) |
identifier |
Yes | Package identifier with optional version (e.g., my-package@1.0.0) |
directory |
Yes | Path to the directory or file to publish |
create |
No | Create package if it does not exist (true/false) |
force |
No | Allow overwriting existing version (true/false) |
region |
No | Override default region: EU, US, or AP |
api |
No | Override API URL |
| Output | Description |
|---|---|
package_url |
The URL of the published package |
The action exports the following environment variables for use in subsequent steps:
| Variable | Description |
|---|---|
BUDDY_PACKAGE_URL |
The URL of the published package |
This action requires authentication with Buddy. Use the buddy/login action before publishing packages:
- name: Login to Buddy
uses: buddy/login@v1
with:
token: ${{ secrets.BUDDY_TOKEN }}
region: 'US'The login action sets the following environment variables that are used by this action:
BUDDY_TOKEN- Authentication tokenBUDDY_API_ENDPOINT- API endpoint URL
By default, this action automatically installs the latest BDY CLI from the production channel. If you need a specific version or channel, use the buddy/setup action first:
- name: Setup BDY CLI
uses: buddy/setup@v1
with:
version: '1.12.8'See the buddy/setup action for more options.
MIT - See LICENSE.md for details.