---
metadata:
  - name: generator
    content: Diplodoc Platform v5.57.3
alternate:
  - https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/releases-work.md
  - https://sourcecraft.dev/portal/docs/ru/sourcecraft/operations/releases-work.md
  - href: en/sourcecraft/operations/releases-work.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/en/llms.txt

# Working with releases in SourceCraft

<!-- source: en/_includes/sourcecraft/releases-intro.md -->
A _release_ is a fixed software product version that comprises a specific set of changes, a tag, a description, and additional resources, such as binaries or archives intended for users or other developers.

Releases offer convenient access to particular repository states for analysis and comparison, off-the-shelf builds for users, and give structure to the project development and versioning history.
<!-- endsource: en/_includes/sourcecraft/releases-intro.md -->

<!-- source: en/_includes/sourcecraft/releases-tags.md -->
Releases in SourceCraft are linked to a repository _tag_, an indicator of a significant milestone in the project's history. Only one release can be associated with one tag.
<!-- endsource: en/_includes/sourcecraft/releases-tags.md -->

For more information, see [Releases in SourceCraft](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/releases.md).

<iframe width="640" height="360" src="https://runtime.strm.yandex.ru/player/video/vplvaddxgkpodelejt7k?autoplay=0&mute=0" allow="autoplay; fullscreen; picture-in-picture; encrypted-media" frameborder="0" scrolling="no"></iframe>

## Creating a release {#create-release}

1. Open the SourceCraft [home page](https://sourcecraft.dev).
1. On the ![image](../../_assets/console-icons/house.svg) **Home** tab, under ![image](../../_assets/console-icons/layout-tabs.svg) **Your craftspace**, navigate to ![image](../../_assets/console-icons/archive.svg) **Repositories** and select your repository.
1. Under ![image](../../_assets/console-icons/code.svg) **Code**, navigate to ![image](../../_assets/console-icons/rocket.svg) **Releases**.
1. In the top-right corner, click **New release**.
1. Under **General information**:
    1. Select the tag to create your new release from.

        {% note info %}

        You can only select a tag that was not used to create releases.
        
        You can use a [pre-created tag](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/tag-create.md) or create a new one.

        {% endnote %}

        To create a new tag:
        1. In the tag selection field, click ![image](../../_assets/console-icons/plus.svg).
        1. In the **Tag** field, enter a name for the tag.
        1. In the **Target** field, select the branch your new tag will be based on.
        1. Click **Save**.
    1. Enter a name for your release.
1. Optionally, under **Release notes**:
    * Select the previous release.
    * Enter a description of the new release, e.g., specify what has been changed, fixed, or improved, and provide details about the update.
1. Optionally, under **Release assets**, click ![image](../../_assets/console-icons/plus.svg) **Add asset** and select the resource type:
    * **File**: Click **Browse** and upload a file from your local PC.

      <!-- source: en/_includes/sourcecraft/releases-limits.md -->
      {% note warning "Limitations" %}

      SourceCraft has [limits](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/limits.md#common-limits) on the size of files you upload to a release.

      {% endnote %}
      <!-- endsource: en/_includes/sourcecraft/releases-limits.md -->

    * **Link**: Add a link to an external resource and enter its displayed name.

    To add another resource, click ![image](../../_assets/console-icons/plus.svg) **Add asset**.

    To delete a resource, click ![image](../../_assets/console-icons/trash-bin.svg) next to it.

1. Click **Publish release**.

    {% note tip %}

    You can also save your release as a draft to modify it later instead of publishing it right away. To do this, click **Save draft**.

    The description and contents of a draft release are available to users with the `Repository admin` or `Repository maintainer` [roles](https://sourcecraft.dev/portal/docs/en/sourcecraft/security/index.md#src-repositories-admin).

    {% endnote %}

## Viewing a release {#view-release}

1. Open the SourceCraft [home page](https://sourcecraft.dev).
1. On the ![image](../../_assets/console-icons/house.svg) **Home** tab, under ![image](../../_assets/console-icons/layout-tabs.svg) **Your craftspace**, navigate to ![image](../../_assets/console-icons/archive.svg) **Repositories** and select your repository.
1. Under ![image](../../_assets/console-icons/code.svg) **Code**, navigate to ![image](../../_assets/console-icons/rocket.svg) **Releases**.

    The page will show a list of releases with their authors, publication dates and times, tags, commits, descriptions, and attached resources.

    The list will also highlight the latest release.

1. Select the release you want to view.

## Downloading release assets {#download-assets}

Each published release contains the following in the **Release assets** section:

* Automatically generated release source code archives in `.zip` and `.tar.gz` formats.
* Files attached to the release when it is [created](#create-release) or [edited](#edit-release).
* External resource links.

You can download them using the SourceCraft UI or the [REST API](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/api-start.md).

{% list tabs group=instructions %}

- SourceCraft UI {#src}

  1. Open the SourceCraft [home page](https://sourcecraft.dev).
  1. On the ![image](../../_assets/console-icons/house.svg) **Home** tab, under ![image](../../_assets/console-icons/layout-tabs.svg) **Your craftspace**, navigate to ![image](../../_assets/console-icons/archive.svg) **Repositories** and select your repository.
  1. Under ![image](../../_assets/console-icons/code.svg) **Code**, navigate to ![image](../../_assets/console-icons/rocket.svg) **Releases**.
  1. In the release card, select an asset in the **Release assets** section:

      * **Source code (zip)**: Download the release source code archive in `.zip` format.
      * **Source code (tar.gz)**: Download the release source code archive in `.tar.gz` format.
      * `<file_name>`: Download the file attached to the release.
      * `<Link>`: Open an external resource.

- REST API {#api}

  You can use the [Get Release (By Tag)](https://sourcecraft.dev/portal/docs/en/api-ref/Repository-or-Releases/GetByTag.md) SourceCraft REST API method to get release asset links. The response will return a list of release assets in the `assets` field. Each asset contains a download link in one of these fields:

  * `archive_link.link`: Link to the release source code archive.
  * `link`: Link to attached file or external resource.

  To get links to release assets:

  1. Get a [personal access token (PAT)](https://sourcecraft.dev/portal/docs/en/sourcecraft/security/pat.md) for API authentication.
  1. Run this query:

      ```bash
      export PAT=<personal_access_token>
      curl \
          --request GET \
          --header "Authorization: Bearer $PAT" \
          --url "https://api.sourcecraft.tech/repos/<organization_slug>/<repository_slug>/releases/tag/<release_tag>" | jq
      ```

      Where:

      * `<organization_slug>`: Slug of the organization owning the repository.
      * `<repository_slug>`: Slug of the repository the release is published in.
      * `<release_tag>`: Tag used to create the release.

  1. Download the release source code archive via the `wget` utility using the link from the `archive_link.link` field:

      ```bash
      wget "<link_from_archive_link.link_field>" --output-document=<file_name>.tar.gz
      ```

      Use the `link` field value to download a file attached to the release or open an external link.

  For more information about authenticating and working with the SourceCraft REST API, see [Working with the SourceCraft REST API](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/api-start.md).

{% endlist %}

## Editing a release {#edit-release}

{% note warning %}

You can edit only a draft release.

{% endnote %}

1. Open the SourceCraft [home page](https://sourcecraft.dev).
1. On the ![image](../../_assets/console-icons/house.svg) **Home** tab, under ![image](../../_assets/console-icons/layout-tabs.svg) **Your craftspace**, navigate to ![image](../../_assets/console-icons/archive.svg) **Repositories** and select your repository.
1. Under ![image](../../_assets/console-icons/code.svg) **Code**, navigate to ![image](../../_assets/console-icons/rocket.svg) **Releases**.
1. Next to the draft release you want to update, click ![image](../../_assets/console-icons/ellipsis.svg) and select ![image](../../_assets/console-icons/pencil.svg) **Edit**.
1. Update the release settings and click **Update release**.

## Canceling and deleting a release {#cancel-release}

{% note info %}

You cannot directly delete a published release; you need to cancel it first.

{% endnote %}

1. Open the SourceCraft [home page](https://sourcecraft.dev).
1. On the ![image](../../_assets/console-icons/house.svg) **Home** tab, under ![image](../../_assets/console-icons/layout-tabs.svg) **Your craftspace**, navigate to ![image](../../_assets/console-icons/archive.svg) **Repositories** and select your repository.
1. Under ![image](../../_assets/console-icons/code.svg) **Code**, navigate to ![image](../../_assets/console-icons/rocket.svg) **Releases**.
1. Next to the release you want to cancel, click ![image](../../_assets/console-icons/ellipsis.svg) and select ![image](../../_assets/console-icons/arrow-uturn-ccw-left.svg) **Discard release**.

    The description and contents of a canceled release remain available to users with the `Repository admin` or `Repository maintainer` [roles](https://sourcecraft.dev/portal/docs/en/sourcecraft/security/index.md#src-repositories-admin).

1. To delete a release from the repository, click ![image](../../_assets/console-icons/ellipsis.svg) next to the release, select ![image](../../_assets/console-icons/trash-bin.svg) **Delete**, and confirm the deletion.

## Comparing releases {#compare-releases}

1. Open the SourceCraft [home page](https://sourcecraft.dev).
1. On the ![image](../../_assets/console-icons/house.svg) **Home** tab, under ![image](../../_assets/console-icons/layout-tabs.svg) **Your craftspace**, navigate to ![image](../../_assets/console-icons/archive.svg) **Repositories** and select your repository.
1. Under ![image](../../_assets/console-icons/code.svg) **Code**, navigate to ![image](../../_assets/console-icons/rocket.svg) **Releases**.
1. Next to the relevant release, click ![image](../../_assets/console-icons/code-compare.svg) **Compare** ![image](../../_assets/console-icons/chevron-down.svg) and select the release to compare it with.

#### Useful links {#see-also}

* [Creating a tag in a SourceCraft repository](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/tag-create.md)
* [Downloading an archive containing a SourceCraft repository](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/repo-download-archive.md)
* [Releases in SourceCraft](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/releases.md)
* [SourceCraft resource relationships](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/index.md)
* [Getting started with SourceCraft](https://sourcecraft.dev/portal/docs/en/sourcecraft/quickstart.md)
