From 92f4d9e2700d0b4024618bb9df90f380dea81493 Mon Sep 17 00:00:00 2001 From: trent-codecov Date: Wed, 11 Oct 2023 10:44:07 -0400 Subject: [PATCH 1/3] Fix release version --- .github/workflows/create_release.yml | 31 +++++++++++++++++----------- .github/workflows/release_flow.yml | 6 +++--- VERSION | 1 - 3 files changed, 22 insertions(+), 16 deletions(-) delete mode 100644 VERSION diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 3783f4e6..b904b9ee 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -8,16 +8,23 @@ on: jobs: create-release: - name: Tag Release ${{ github.head_ref }} - if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') && github.repository_owner == 'codecov' }} - uses: codecov/gha-workflows/.github/workflows/create-release.yml@v1.2.1 - secrets: inherit + env: + GITHUB_TOKEN: ${{ secrets.CODECOV_RELEASE_PAT }} + name: Create Github Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 - release: - needs: [create-release] - if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') && github.repository_owner == 'codecov' }} - uses: ./.github/workflows/release_flow.yml - permissions: - id-token: write # This is required for requesting the JWT - contents: read # This is required for actions/checkout - secrets: inherit \ No newline at end of file + - id: get-release-vars + name: Configure Release Vars + run: | + grep -E "version='(\d\.\d\.\d)'" setup.py | grep -Eo "\d.\d.\d" >> "$GITHUB_OUTPUT" + + - name: Create GH Release + uses: softprops/action-gh-release@v0.1.15 + with: + name: Release ${{ steps.get-release-vars.outputs.release_version }} + tag_name: ${{ inputs.tag_to_prepend }}${{ steps.get-release-vars.outputs.release_version }} + generate_release_notes: true + body: Autogenerated for ${{ steps.get-release-vars.outputs.release_version }}. Created for ${{ github.event.pull_request.html_url }} \ No newline at end of file diff --git a/.github/workflows/release_flow.yml b/.github/workflows/release_flow.yml index 64d65638..60631105 100644 --- a/.github/workflows/release_flow.yml +++ b/.github/workflows/release_flow.yml @@ -4,9 +4,9 @@ name: Build-and-Release on: - workflow_call: release: - types: created + types: + - created jobs: build_and_publish_to_pipy: @@ -15,7 +15,7 @@ jobs: id-token: write # This is required for requesting the JWT contents: read # This is required for actions/checkout steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Set up Python 3.11 diff --git a/VERSION b/VERSION deleted file mode 100644 index 53b61ecf..00000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.3.6 \ No newline at end of file From e8f5124546c3893fb465b71525bbd5fe9aa527fc Mon Sep 17 00:00:00 2001 From: trent-codecov Date: Wed, 11 Oct 2023 10:54:13 -0400 Subject: [PATCH 2/3] Fix release version --- .github/workflows/create_release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 85ca6ad7..d737bca6 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -9,7 +9,6 @@ on: jobs: create-release: if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') && github.repository_owner == 'codecov' }} - env: GITHUB_TOKEN: ${{ secrets.CODECOV_RELEASE_PAT }} name: Create Github Release From 6c3601d441d8d10b70c2ba9abc03969c63c9e994 Mon Sep 17 00:00:00 2001 From: trent-codecov Date: Wed, 11 Oct 2023 11:03:01 -0400 Subject: [PATCH 3/3] Fix release version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f08fa314..0276840a 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name="codecov-cli", - version="0.3.8", + version="0.3.7", packages=find_packages(exclude=["contrib", "docs", "tests*"]), description="Codecov Command Line Interface", long_description=long_description,