By Jaws Deploy team · Updated

Integrating GitHub Actions

Add one step at the end of your workflow that creates a Jaws Deploy release tied to the commit you just built.

Search guides... Ctrl K

Jaws Deploy works with GitHub Actions through the REST API or the PowerShell SDK. The shape is the same as any CI integration: build and test in GitHub Actions, then call out at the end of the workflow to create a release.

// Minimal workflow step

Add at the end of an existing workflow

Store the service account ID and API key in GitHub Actions secrets (Settings -> Secrets and variables -> Actions).

- name: Create Jaws Deploy release
  shell: pwsh
  env:
    JAWS_API_LOGIN: ${{ secrets.JAWS_SERVICE_ACCOUNT_ID }}
    JAWS_API_PASSWORD: ${{ secrets.JAWS_API_KEY }}
  run: |
    Import-Module ./JawsDeploySdk.psm1   # github.com/JawsDeploy/powershell-sdk
    New-JawsRelease `
        -projectId       "<project id>" `
        -version         "1.0.${{ github.run_number }}" `
        -packageVersions @{ "Checkout.Web" = "1.0.${{ github.run_number }}" }

Using the REST API instead

If you prefer not to use PowerShell, the REST API takes the same parameters. Use Basic auth with a service account ID and the API key.

// REST API equivalent

Same outcome, plain curl

curl -X POST "https://app.jawsdeploy.net/api/release" \
  -u "$JAWS_API_LOGIN:$JAWS_API_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{
    "projectId":       "<project id>",
    "version":         "1.0.'"$GITHUB_RUN_NUMBER"'",
    "packageVersions": { "Checkout.Web": "1.0.'"$GITHUB_RUN_NUMBER"'" }
  }'