---
schema_version: "1"
id: 7ab55584c53cc2f4d1c77f0e5300ec5f011b88cde490a5e69b413d1ef92e435e
title: Publishing Unified-Model Policies to Exchange
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/pdk/1.7/policies-pdk-publish-policies.md
canonical_url: https://docs.mulesoft.com/pdk/1.7/policies-pdk-publish-policies
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 2681f5db17916f480d1af9912a5d59e0d1224bcda137c0aed3f0b390713db29e
description: MuleSoft Documentation Site
release: "1.7"
latest: false
---
---
product: Omni Gateway Policy Development Kit (PDK)
version: 1.7
---

# Publishing Unified-Model Policies to Exchange

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

During the custom policy development cycle, you can upload your policy to Exchange to create a new
Exchange asset to manage the policy’s version and to distribute it to other users. For more
information about Exchange, see [Anypoint Exchange Overview](https://docs.mulesoft.com/exchange/).

For custom policies running in Local Mode, it is not required to publish your policy to Exchange.
However, Exchange is a useful version control tool. It is your responsibility to distribute custom
policies for Local Mode use.

When uploading your policy to Exchange, you can choose to either:

- [Publish a Custom Policy](#publish)  
  Publish a policy if the policy version is still in development. This enables you to test and edit
  the policy version.

- [Release a Custom Policy](#release)  
  Release the policy to create a definitive version of the policy. After releasing the policy, you
  must create a new policy version to edit the policy.

Every time you publish or release a policy, you create a new `stable` asset in Exchange. For more
information about `stable` state assets, see
[Stable State Assets](https://docs.mulesoft.com/exchange/lifecycle#stablet-state).

After you upload your policy to Exchange, see
[Applying Custom Policies](https://docs.mulesoft.com/pdk/1.7/policies-pdk-apply-policies).

## Before You Begin

- Ensure that the Connected App you used to authenticate to the
  [Anypoint Platform CLI](https://docs.mulesoft.com/pdk/1.7/policies-pdk-prerequisites#cli) has the `Exchange Contributor` scope
  applied.

- [Compile your Policy](https://docs.mulesoft.com/pdk/1.7/policies-pdk-compile-policies).

## Publish a Custom Policy

To publish a custom policy, run the `make publish` command from the policy’s root folder:

```ssh
make publish
```

After publishing the asset, a new asset labeled `DEV` appears in Exchange:

![Policy appears in Exchange labeled DEV.](/mulesoft/current/en-us/pdk/1.7/_images/pdk-dev-asset.png)

The asset’s group ID, asset ID, and asset version (GAV) appear, similar to the following:

- **groupID**: `<organizationId>`

- **assetID**: `my-custom-policy-dev`

  When publishing a policy, `-dev` appears appended to the **assetID**.

- **version**: `1.0.0-20230618115723`

  When publishing a policy, a timestamp appears appended to the **version**.

Rerunning the publish command creates a new version of the policy asset with an updated timestamp.
Previously published policy versions are still available.

## Release a Custom Policy

To release a custom policy, run the `make release` command from the policy’s root folder:

```ssh
make release
```

Released policies are not labeled `DEV`. The asset’s GAV appears similar to the following:

- **groupID**: `<organizationId>`

- **assetID**: `my-custom-policy`

  Released policies do not have `-dev` appended to their **assetID**.

- **version**: `1.0.0`

  Released policies do not have a timestamp appended to their **assetID**.

After releasing the asset, rerunning the `make release` command results in a conflict error.

To begin working on the next version of your policy, update the version number in the `Cargo.toml`
file.

For example, if the latest version is `1.0.0`, update the `Cargo.toml` file as follows to begin
working on a minor release:

```toml
name = "my-custom-policy"
version = "1.1.0"
```

## See Also

- [Applying Custom Policies](https://docs.mulesoft.com/pdk/1.7/policies-pdk-apply-policies)

- [PDK Troubleshooting](https://docs.mulesoft.com/pdk/1.7/policies-pdk-troubleshooting)
