github.com/cozy/cozy-stack@v0.0.0-20240603063001-31110fa4cae1/docs/release.md (about)

     1  [Table of contents](README.md#table-of-contents)
     2  
     3  # Building a release
     4  
     5  To build a release of cozy-stack, a `build.sh` script can automate the work. The
     6  `release` option of this script will generate a binary with a name containing
     7  the version of the file, along with a SHA-256 sum of the binary.
     8  
     9  You can use a `local.env` at the root of the repository to add your default
    10  values for environment variables.
    11  
    12  See `./scripts/build.sh --help` for more informations.
    13  
    14  ```sh
    15  COZY_ENV=development GOOS=linux GOARCH=amd64 ./scripts/build.sh release
    16  ```
    17  
    18  The version string is deterministic and reflects entirely the state of the
    19  working-directory from which the release is built from. It is generated using
    20  the following format:
    21  
    22  ```
    23  <TAG>[-<NUMBER OF COMMITS AFTER TAG>][-dirty][-dev]
    24  ```
    25  
    26  Where:
    27  
    28  - `<TAG>`: closest annotated tag of the current working directory. If no tag
    29    is present, is uses the string "v0". This is not allowed in a production
    30    release.
    31  - `<NUMBER OF COMMITS AFTER TAG>`: number of commits after the closest tag if
    32    the current working directory does not point exactly to a tag
    33  - `dirty`: added if the working if the working-directory is not clean
    34    (contains un-commited modifications). This is not allowed in production
    35    release.
    36  - `dev`: added for a development mode release
    37  
    38  # Sprint release
    39  
    40  At the end of a sprint, we release different versions of the stack:
    41  
    42  - "Naked" stack, for GNU/Linux amd64/arm, FreeBSD amd64
    43  - Docker image for cozy-app-dev
    44  - Production docker image for cozy-stack
    45  - Debian/Ubuntu self-hosting packages
    46  
    47  The release process is as follow:
    48  
    49  - Create a tag `x.y.z` and push it
    50  - The release is created by GitHub Actions with
    51      `.github/workflows/release.yml`
    52  - GitHub Actions build all artifacts and publish them as
    53    release artifacts and docker images on Docker Hub:
    54    - The binaries are generated by GitHub Actions by the script
    55      `./scripts/build.sh`
    56    - `cozy-stack` production docker image is built by the script
    57      `./scripts/docker/production/release.sh`
    58    - `cozy-app-dev` docker image is built by the script
    59      `./scripts/docker/cozy-app-dev/release.sh`
    60    - The deb packages are generated with the scripts
    61      in `./scripts/packaging`