Skip to content

deploypulseio/setup-dpctl

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Automate DeployPulse app deployment

This action wraps the dpctl installation into a simple step. Use it to deploy or manage your DeployPulse apps via Github Actions events.

Tip

For production deployments, pin dpctl to a specific version to avoid unexpected behavior in edge releases.

name: Publish to DeployPulse
on: [push]
jobs:
  deploy:
    name: Deploy to DeployPulse
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: deploypulseio/setup-dpctl@v1
        with:
          setup-node: true
      - name: Get Target Version from package.json
        id: app_version
        run: echo "target_version=$(node -p 'require("./package.json").version')" >> "$GITHUB_OUTPUT"

      - name: Release iOS Update to DeployPulse
        run: |
          dpctl release-react \
            "$APP_NAME" ios \
            -d "$DEPLOYMENT" \
            --mandatory \
            --targetBinaryVersion "$TARGET_VERSION" \
            --description "CodePush Release for Version $TARGET_VERSION" \
            --disabled false
        env:
          DEPLOYPULSE_ACCESS_KEY: ${{ secrets.DEPLOYPULSE_ACCESS_KEY }}
          APP_NAME: ${{ vars.DEPLOYPULSE_IOS_APP_NAME }}
          DEPLOYMENT: ${{ vars.DEPLOYPULSE_DEPLOYMENT_NAME }}
          TARGET_VERSION: ${{ steps.app_version.outputs.target_version }}

      - name: Release Android Update to DeployPulse
        run: |
          dpctl release-react \
            "$APP_NAME" android \
            -d "$DEPLOYMENT" \
            --mandatory \
            --targetBinaryVersion "$TARGET_VERSION" \
            --description "CodePush Release for Version $TARGET_VERSION" \
            --disabled false
        env:
          DEPLOYPULSE_ACCESS_KEY: ${{ secrets.DEPLOYPULSE_ACCESS_KEY }}
          APP_NAME: ${{ vars.DEPLOYPULSE_ANDROID_APP_NAME }}
          DEPLOYMENT: ${{ vars.DEPLOYPULSE_DEPLOYMENT_NAME }}
          TARGET_VERSION: ${{ steps.app_version.outputs.target_version }}

Pin to a specific version of dpctl:

- uses: deploypulseio/setup-dpctl@v1
  with:
    version: "v1.0.0"

Pin to a specific version of Node:

- uses: deploypulseio/setup-dpctl@v1
  with:
    node-version: "23"

Specify the source that dpctl will be installed from:

- uses: deploypulseio/setup-dpctl@v1
  with:
    source: "git" 

See the dpctl GitHub project for more information on using dpctl.

Secrets

DEPLOYPULSE_ACCESS_KEY - Required. The token to use for authentication. You can create a token by running dpctl login or dpctl access-key add "CI/CD Workflow" if you're already logged in.

About

GitHub Action that wraps the dpctl CLI tool

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors