From e539e7f1921cad6dfc981fceb81ea72a43305e3f Mon Sep 17 00:00:00 2001 From: Hien To Date: Wed, 22 May 2024 15:38:09 +0700 Subject: [PATCH 1/3] Replace deprecated steps github action --- .github/workflows/cortex-cpp-build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cortex-cpp-build.yml b/.github/workflows/cortex-cpp-build.yml index 69915a034..d09de525c 100644 --- a/.github/workflows/cortex-cpp-build.yml +++ b/.github/workflows/cortex-cpp-build.yml @@ -31,12 +31,11 @@ jobs: GITHUB_REF: ${{ github.ref }} - name: Create Draft Release id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v2 with: tag_name: ${{ github.ref_name }} - release_name: "${{ env.VERSION }}" + token: ${{ secrets.GITHUB_TOKEN }} + name: "${{ env.VERSION }}" draft: true prerelease: false From 41a420f91332fd3d4d4af5f000140cd7ddf0fe3b Mon Sep 17 00:00:00 2001 From: Hien To Date: Wed, 22 May 2024 15:40:17 +0700 Subject: [PATCH 2/3] Add release drafter --- .github/workflows/cortex-cpp-build.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cortex-cpp-build.yml b/.github/workflows/cortex-cpp-build.yml index d09de525c..f49757324 100644 --- a/.github/workflows/cortex-cpp-build.yml +++ b/.github/workflows/cortex-cpp-build.yml @@ -234,4 +234,28 @@ jobs: upload_url: ${{ needs.create-draft-release.outputs.upload_url }} asset_path: ./cortex-cpp/cortex-cpp.tar.gz asset_name: cortex-cpp-${{ needs.create-draft-release.outputs.version }}-${{ matrix.os }}-${{ matrix.name }}.tar.gz - asset_content_type: application/gzip \ No newline at end of file + asset_content_type: application/gzip + + update_release_draft: + needs: [build-and-test] + permissions: + # write permission is required to create a github release + contents: write + # write permission is required for autolabeler + # otherwise, read permission is required at least + pull-requests: write + runs-on: ubuntu-latest + steps: + # (Optional) GitHub Enterprise requires GHE_HOST variable set + #- name: Set GHE_HOST + # run: | + # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV + + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml + # with: + # config-name: my-config.yml + # disable-autolabeler: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From ed534aba78f5c9435c85d399478a04322c428e90 Mon Sep 17 00:00:00 2001 From: Hien To Date: Wed, 22 May 2024 15:41:05 +0700 Subject: [PATCH 3/3] Add Pull request template --- .github/pull_request_template.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..320545b9a --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,14 @@ +## Describe Your Changes + +- + +## Fixes Issues + +- Closes # +- Closes # + +## Self Checklist + +- [ ] Added relevant comments, esp in complex areas +- [ ] Updated docs (for bug fixes / features) +- [ ] Created issues for follow-up changes or refactoring needed \ No newline at end of file