Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:

steps:
- id: meta_development
if: needs.secrets.check.type == 'development'
if: needs.context.check.type == 'development'
name: Docker Meta (development)
uses: docker/metadata-action@v4
with:
Expand All @@ -128,17 +128,17 @@ jobs:
type=ref,event=branch

- id: meta_release
if: needs.secrets.check.type == 'release'
if: needs.context.check.type == 'release'
name: Docker Meta (release)
uses: docker/metadata-action@v4
with:
images: |
"${{ secrets.DOCKER_HUB_USERNAME }}/${{secrets.DOCKER_HUB_REPOSITORY_NAME }}"
tags: |
type=semver,value=${{ needs.secrets.check.version }},pattern={{raw}}
type=semver,value=${{ needs.secrets.check.version }},pattern={{version}}
type=semver,value=${{ needs.secrets.check.version }},pattern=v{{major}}
type=semver,value=${{ needs.secrets.check.version }},pattern={{major}}.{{minor}}
type=semver,value=${{ needs.context.check.version }},pattern={{raw}}
type=semver,value=${{ needs.context.check.version }},pattern={{version}}
type=semver,value=${{ needs.context.check.version }},pattern=v{{major}}
type=semver,value=${{ needs.context.check.version }},pattern={{major}}.{{minor}}

- id: login
name: Login to Docker Hub
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,27 @@ env:
CARGO_TERM_COLOR: always

jobs:
secrets:
name: Secrets
environment: coverage
runs-on: ubuntu-latest

outputs:
continue: ${{ steps.check.outputs.continue }}

steps:
- id: check
name: Check
env:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
if: "${{ env.CODECOV_TOKEN != '' }}"
run: echo "continue=true" >> $GITHUB_OUTPUT

report:
name: Report
environment: coverage
needs: secrets
if: needs.secrets.outputs.continue == 'true'
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: "0"
Expand Down
61 changes: 61 additions & 0 deletions docs/release_process.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Torrust Tracker Release Process (draft)

The purpose of this document is to describe the release process.

## Overview

Torrust Tracker is published in this order:

1. `develop` branch is ready for publishing.
2. create `release: version (semantic version)` commit.
3. push release commit to `main` branch.
4. check all status checks succeed for `main` branch.
5. push `main` branch to `releases\v(semantic version)` branch.
6. check all status checks success for `releases\v(semantic version)` branch.
7. create signed `v(semantic version)` tag.
8. create github release from `v(semantic version)` tag.
9. merge `main` branch into `develop` branch.

- At step `1.`, `develop` is automatically published to `dockerhub`.
- At step `3.`, `main` is automatically published to `dockerhub`.
- At step `5.`, `releases\v(semantic version)` is automatically published to `dockerhub` and `crate.io`.

## Development Branch

The `develop` branch, the default branch for the repository is automatically published to dockerhub with the `develop` label. This process happens automatically when a pull request is merged in, and the `container.yaml` workflow is triggered.

## Main Branch

The `main` branch is the staging branch for releases.

A release commit needs to be made that prepares the repository for the release, this commit should include:

- Changing the semantic version.
- Finalizing the release notes and changelog.

The title of the commit should be: `release: version (semantic version)`.

This commit should be committed upon the head of the development branch, and pushed to the `main` branch.

Once the release has succeeded, the `main` branch should be merged back into the `develop` branch.

## Releases Branch

According to the patten `releases/v(semantic version)`, the `main` branch head is published to here to trigger the deployment workflows.

The repository deployment environment for crates.io is only available for the `releases/**/*` patten of branches.

Once the publishing workflows have succeeded; we can make the git-tag.

## Release Tag

Create a Signed Tag with a short message in the form `v(semantic version)` and push it to the repository.

## Github Release

From the newly published tag, create a Github Release using the web-interface.


## Merge back into development branch

After this is all successful, the `main` branch should be merged into the `develop` branch.