Skip to content

Commit

Permalink
Fix release version
Browse files Browse the repository at this point in the history
  • Loading branch information
trent-codecov committed Oct 11, 2023
1 parent dcecf17 commit 92f4d9e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
31 changes: 19 additions & 12 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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
- 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/[email protected]
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 }}
6 changes: 3 additions & 3 deletions .github/workflows/release_flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
name: Build-and-Release

on:
workflow_call:
release:
types: created
types:
- created

jobs:
build_and_publish_to_pipy:
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

0 comments on commit 92f4d9e

Please sign in to comment.