From ccf1824d57d35ba90e35156c361874d47f26235c Mon Sep 17 00:00:00 2001 From: Oliver Sun Date: Wed, 1 Nov 2023 17:44:53 -0400 Subject: [PATCH] maybe --- .github/workflows/release.yaml | 12 +----------- .github/workflows/release_perform.yaml | 27 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/release_perform.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index deac25bca4..f3b2cbb850 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,20 +1,10 @@ -name: Release +name: Release Prepare on: workflow_dispatch: inputs: version: type: string description: The version you intend to release without leading 'v' (eg x.y.z and not vx.y.z) - pull_request: - types: [closed] - push: - branches: - - "release/**" - - "next/**" - tags: - - v* - release: - types: [created] env: VERSION: ${{ github.event.inputs.version }} diff --git a/.github/workflows/release_perform.yaml b/.github/workflows/release_perform.yaml new file mode 100644 index 0000000000..ffd42f483e --- /dev/null +++ b/.github/workflows/release_perform.yaml @@ -0,0 +1,27 @@ +name: Release Perform +on: + workflow_dispatch: + pull_request: + types: [closed] + +jobs: + tag: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release') }} + steps: + - name: Set VERSION variable from tag + run: | + VERSION=${{github.head_ref}} + echo "VERSION=${VERSION##*/}" >> $GITHUB_ENV + - name: Checkout repository code + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + # skip generating assets, which potentially requires setup-go + - name: Fetch Changelog + run: .github/actions/changelog-action/entrypoint.sh > ${{env.VERSION}}-CHANGELOG.md + - run: gh release create --notes-file ${{env.VERSION}}-CHANGELOG.md ${{env.VERSION}} ./random.txt + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # placeholder for slack notification \ No newline at end of file