From ecf04e6bd7db0ae120db461b70005d6722b5716a Mon Sep 17 00:00:00 2001 From: "tianye.song" Date: Fri, 9 May 2025 13:43:30 -0700 Subject: [PATCH] Add main release logic --- .github/workflows/ci_cd.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index f195835..50f91c2 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -339,4 +339,36 @@ jobs: fail_on_unmatched_files: true generate_release_notes: true files: | - dist/${{ github.event.repository.name }}-** \ No newline at end of file + dist/${{ github.event.repository.name }}-** + + main_release: + name: Update main aali repo and create release + needs: [ release, docker ] + runs-on: ubuntu-latest + steps: + - name: Checkout aali repository + run: | + git clone --branch main https://${{ secrets.AALI_RELEASE_TOKEN }}@github.com/ansys/aali.git + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version-file: 'aali/scripts/releasehelper/go.mod' + + - name: Run tag script + run: | + cd aali/scripts/releasehelper + go run main.go "tag" ${{ github.ref_name }} ${{ secrets.AALI_RELEASE_TOKEN }} + + - name: Commit and push to aali + run: | + cd aali + git config --global user.email '${{ github.actor }}@users.noreply.github.com' + git config --global user.name '${{ github.actor }}' + git commit -a -m 'New release triggered by ${{ github.event.repository.name }}' + git push origin main + + - name: Run release script + run: | + cd aali/scripts/releasehelper + go run main.go "release" ${{ github.ref_name }} ${{ secrets.AALI_RELEASE_TOKEN }} \ No newline at end of file