Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit ccba317

Browse files
chore: New release process (#274)
This proposed release process is heavily inspired in the worker self-hosted release. My beef with the current release process is having to create a PR that updates the version number, AND then manually creating a release. This proposed workflow will have you manually trigger the `create_release_pr` action with the version number you want. That will create a PR for you that you can merge yourself. This PR will then trigger a new release to be created, and the release assets will be generated from that. THe VERSION file is so we can re-use the existing "create PR" workflow as is. Thanks @trent-codecov for the updated, reusable workflows ❤️
1 parent 127e8af commit ccba317

File tree

5 files changed

+35
-3
lines changed

5 files changed

+35
-3
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Create CLI Release
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types: [closed]
8+
9+
jobs:
10+
create-release:
11+
name: Tag Release ${{ github.head_ref }}
12+
if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') && github.repository_owner == 'codecov' }}
13+
uses: codecov/gha-workflows/.github/workflows/[email protected]
14+
secrets: inherit
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Create CLI Release PR
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
versionName:
7+
description: 'Name of version (ie 23.9.5)'
8+
required: true
9+
10+
jobs:
11+
create-release-pr:
12+
name: Create PR for Release ${{ github.event.inputs.versionName }}
13+
uses: codecov/gha-workflows/.github/workflows/[email protected]
14+
secrets: inherit

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.3.3

codecov_cli/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
__version__ = "0.3.3"
1+
with open("VERSION", encoding="utf-8") as f:
2+
version_number = f.readline().strip()
3+
4+
__version__ = version_number

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
with open(path.join(here, "README.md"), encoding="utf-8") as f:
99
long_description = f.read()
1010

11-
with open(path.join(here, "codecov_cli/__init__.py"), encoding="utf-8") as f:
12-
version = f.read().split('"')[1]
11+
with open(path.join(here, "VERSION"), encoding="utf-8") as f:
12+
version = f.readline().strip()
1313

1414
setup(
1515
name="codecov-cli",

0 commit comments

Comments
 (0)