Skip to content

Commit af712a2

Browse files
committed
Merge #412: More Release Preparation
7365423 ci: use coverage environment (Cameron Garnham) d9a506a docs: draft release process document (Cameron Garnham) d09fa65 dev: fixup container workfows bug (Cameron Garnham) Pull request description: ACKs for top commit: da2ce7: ACK 7365423 Tree-SHA512: 33fd00c290b83d8271f720245def67d9e8c292029267873449c54a5266f3a3b14d192f9d008ac71f423ff98f4c3cf3dc9d15e10c8a18d89f2678d022c367b554
2 parents 739066d + 7365423 commit af712a2

3 files changed

Lines changed: 86 additions & 6 deletions

File tree

.github/workflows/container.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118

119119
steps:
120120
- id: meta_development
121-
if: needs.secrets.check.type == 'development'
121+
if: needs.context.check.type == 'development'
122122
name: Docker Meta (development)
123123
uses: docker/metadata-action@v4
124124
with:
@@ -128,17 +128,17 @@ jobs:
128128
type=ref,event=branch
129129
130130
- id: meta_release
131-
if: needs.secrets.check.type == 'release'
131+
if: needs.context.check.type == 'release'
132132
name: Docker Meta (release)
133133
uses: docker/metadata-action@v4
134134
with:
135135
images: |
136136
"${{ secrets.DOCKER_HUB_USERNAME }}/${{secrets.DOCKER_HUB_REPOSITORY_NAME }}"
137137
tags: |
138-
type=semver,value=${{ needs.secrets.check.version }},pattern={{raw}}
139-
type=semver,value=${{ needs.secrets.check.version }},pattern={{version}}
140-
type=semver,value=${{ needs.secrets.check.version }},pattern=v{{major}}
141-
type=semver,value=${{ needs.secrets.check.version }},pattern={{major}}.{{minor}}
138+
type=semver,value=${{ needs.context.check.version }},pattern={{raw}}
139+
type=semver,value=${{ needs.context.check.version }},pattern={{version}}
140+
type=semver,value=${{ needs.context.check.version }},pattern=v{{major}}
141+
type=semver,value=${{ needs.context.check.version }},pattern={{major}}.{{minor}}
142142
143143
- id: login
144144
name: Login to Docker Hub

.github/workflows/coverage.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,27 @@ env:
88
CARGO_TERM_COLOR: always
99

1010
jobs:
11+
secrets:
12+
name: Secrets
13+
environment: coverage
14+
runs-on: ubuntu-latest
15+
16+
outputs:
17+
continue: ${{ steps.check.outputs.continue }}
18+
19+
steps:
20+
- id: check
21+
name: Check
22+
env:
23+
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
24+
if: "${{ env.CODECOV_TOKEN != '' }}"
25+
run: echo "continue=true" >> $GITHUB_OUTPUT
26+
1127
report:
1228
name: Report
29+
environment: coverage
30+
needs: secrets
31+
if: needs.secrets.outputs.continue == 'true'
1332
runs-on: ubuntu-latest
1433
env:
1534
CARGO_INCREMENTAL: "0"

docs/release_process.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Torrust Tracker Release Process (draft)
2+
3+
The purpose of this document is to describe the release process.
4+
5+
## Overview
6+
7+
Torrust Tracker is published in this order:
8+
9+
1. `develop` branch is ready for publishing.
10+
2. create `release: version (semantic version)` commit.
11+
3. push release commit to `main` branch.
12+
4. check all status checks succeed for `main` branch.
13+
5. push `main` branch to `releases\v(semantic version)` branch.
14+
6. check all status checks success for `releases\v(semantic version)` branch.
15+
7. create signed `v(semantic version)` tag.
16+
8. create github release from `v(semantic version)` tag.
17+
9. merge `main` branch into `develop` branch.
18+
19+
- At step `1.`, `develop` is automatically published to `dockerhub`.
20+
- At step `3.`, `main` is automatically published to `dockerhub`.
21+
- At step `5.`, `releases\v(semantic version)` is automatically published to `dockerhub` and `crate.io`.
22+
23+
## Development Branch
24+
25+
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.
26+
27+
## Main Branch
28+
29+
The `main` branch is the staging branch for releases.
30+
31+
A release commit needs to be made that prepares the repository for the release, this commit should include:
32+
33+
- Changing the semantic version.
34+
- Finalizing the release notes and changelog.
35+
36+
The title of the commit should be: `release: version (semantic version)`.
37+
38+
This commit should be committed upon the head of the development branch, and pushed to the `main` branch.
39+
40+
Once the release has succeeded, the `main` branch should be merged back into the `develop` branch.
41+
42+
## Releases Branch
43+
44+
According to the patten `releases/v(semantic version)`, the `main` branch head is published to here to trigger the deployment workflows.
45+
46+
The repository deployment environment for crates.io is only available for the `releases/**/*` patten of branches.
47+
48+
Once the publishing workflows have succeeded; we can make the git-tag.
49+
50+
## Release Tag
51+
52+
Create a Signed Tag with a short message in the form `v(semantic version)` and push it to the repository.
53+
54+
## Github Release
55+
56+
From the newly published tag, create a Github Release using the web-interface.
57+
58+
59+
## Merge back into development branch
60+
61+
After this is all successful, the `main` branch should be merged into the `develop` branch.

0 commit comments

Comments
 (0)