From 76b8c74a1b55a2ed03c25adff141fbecd827f9f4 Mon Sep 17 00:00:00 2001 From: zhujian Date: Tue, 17 Oct 2023 03:10:14 +0000 Subject: [PATCH] :seedling: Update github action for release Signed-off-by: zhujian --- .github/workflows/go-release.yml | 36 ++++++++++---------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml index 3509c604..2221597f 100644 --- a/.github/workflows/go-release.yml +++ b/.github/workflows/go-release.yml @@ -110,12 +110,19 @@ jobs: pushd release helm package ../charts/${{ env.CHART_NAME }}/ popd + - name: generate changelog + run: | + echo "# Managed ServiceAccount ${{ needs.env.outputs.RELEASE_VERSION }}" > /home/runner/work/changelog.txt - name: publish release - uses: ncipollo/release-action@v1 + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag: ${{ env.RELEASE_VERSION }} - artifacts: "go/src/open-cluster-management.io/managed-serviceaccount/release/*.tgz" - token: ${{ secrets.GITHUB_TOKEN }} + body_path: /home/runner/work/changelog.txt + files: | + release/*.tgz + draft: true + generate_release_notes: true - name: submit charts to OCM chart repo uses: actions/github-script@v6 with: @@ -138,24 +145,3 @@ jobs: console.error(error); core.setFailed(error); } - release-notes: - name: release-notes - runs-on: ubuntu-latest - needs: [ env ] - steps: - - name: checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 1 - path: go/src/open-cluster-management.io/managed-serviceaccount - - name: generate changelog - run: | - echo "# Managed ServiceAccount ${{ needs.env.outputs.RELEASE_VERSION }}" > /home/runner/work/changelog.txt - - name: publish release - uses: softprops/action-gh-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - body_path: /home/runner/work/changelog.txt - draft: true - generate_release_notes: true