Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ratakondalaarun/pub.dev-cd
This Action publishes dart package to the pub.dev
https://github.com/ratakondalaarun/pub.dev-cd
actions ci-cd dart dart-package github-actions pub-dev
Last synced: about 1 month ago
JSON representation
This Action publishes dart package to the pub.dev
- Host: GitHub
- URL: https://github.com/ratakondalaarun/pub.dev-cd
- Owner: RatakondalaArun
- Created: 2021-05-16T14:12:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-28T17:52:47.000Z (about 2 years ago)
- Last Synced: 2024-10-14T09:15:17.197Z (about 1 month ago)
- Topics: actions, ci-cd, dart, dart-package, github-actions, pub-dev
- Language: Shell
- Homepage: https://github.com/marketplace/actions/pub-dev-cd
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Pub.dev-CD
This [Github Action](https://github.com/marketplace/actions/pub-dev-cd) publishing dart package to [pub.dev](https://pub.dev)
## Usage
This actions depends on **dart SDK** so you must use [`uses: dart-lang/setup-dart`](https://github.com/marketplace/actions/setup-dart-sdk)
### Inputs
This action takes the following inputs:
- `creditionals`: Uses this account creditionals to publish
You must be logged in to pub.dev to find this `creditional.json` file under| Platform | path |
| --------- | ------------------------------------------------------------------------------------- |
| `Windows` | `%LOCALAPPDATA%\Pub\Cache\credentials.json` or `%APPDATA%\Pub\Cache\credentials.json` |
| `Linux` | `~/.pub-cache/credentials.json` |
| `Mac-OS` | `~/.pub-cache/credentials.json` |copy the contents of this file and use [GitHub secret](https://docs.github.com/en/actions/reference/encrypted-secrets) to access it in you work flow.
*If this file doesn't exist try `dart pub logout && dart pub login`.*- `package_path`: path to the package from root of a repository
- defaults to root directory `.`
- should not start with a `/` and end with `/`## Basic Example
```yaml
name: cd-action-test-publish
on:
release:
types: [published]jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]- name: π§ Setup Dart SDK
uses: dart-lang/[email protected]
- name: π§ͺ Run tests
run: dart testpublish-to-pub:
runs-on: ubuntu-latest
needs: [tests] # only runs after the job successfully finishes
steps:
- uses: actions/[email protected]- name: π§ Setup Dart SDK
uses: dart-lang/[email protected] # setups dart sdk on this machine
- name: πPublish
uses: RatakondalaArun/pub.dev-cd@v1
with:
creditionals: ${{secrets.PUB_CREDITIONALS}}
# package_path: packages/subpackage
```