Giter Club home page Giter Club logo

pub.dev-cd's Introduction

Pub.dev-CD

This Github Action publishing dart package to pub.dev

Usage

This actions depends on dart SDK so you must use uses: dart-lang/setup-dart

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 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

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 test

  publish-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

pub.dev-cd's People

Contributors

ratakondalaarun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.