From a87cff790c18ce1ca42644739bef1a6b02922902 Mon Sep 17 00:00:00 2001 From: Yunze Xu Date: Fri, 29 Dec 2023 21:29:07 +0800 Subject: [PATCH 1/2] [CI] Upload the NAR package when pushing a tag --- .github/workflows/release.yaml | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000000..1229d830d2 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,36 @@ +name: Release +on: + # TODO: remove it + pull_request: + branches: + - master + push: + tags: + - '*' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + release: + name: Release KoP + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' + - name: Build artifacts + run: mvn clean install -ntp -B -DskipTests + - name: Create package directory + run: | + mkdir packages + cp ./kafka-impl/target/*.nar packages/ + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: packages + path: ./packages From 003e6b30e67d43838625f864dbc7c75288e3829b Mon Sep 17 00:00:00 2001 From: Yunze Xu Date: Fri, 29 Dec 2023 21:59:20 +0800 Subject: [PATCH 2/2] Remove unused workflows --- .github/PULL_REQUEST_TEMPLATE.md | 39 ----------------------- .github/workflows/documentbot.yml | 51 ------------------------------ .github/workflows/release-note.yml | 20 ------------ .github/workflows/release.yaml | 4 --- 4 files changed, 114 deletions(-) delete mode 100644 .github/workflows/documentbot.yml delete mode 100644 .github/workflows/release-note.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b6ae3502a0..67d947656f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -28,42 +28,3 @@ Master Issue: # ### Modifications *Describe the modifications you've done.* - -### Verifying this change - -- [ ] Make sure that the change passes the CI checks. - -*(Please pick either of the following options)* - -This change is a trivial rework / code cleanup without any test coverage. - -*(or)* - -This change is already covered by existing tests, such as *(please describe tests)*. - -*(or)* - -This change added tests and can be verified as follows: - -*(example:)* - - *Added integration tests for end-to-end deployment with large payloads (10MB)* - - *Extended integration test for recovery after broker failure* - -### Documentation - -Check the box below. - -Need to update docs? - -- [ ] `doc-required` - - (If you need help on updating docs, create a doc issue) - -- [ ] `no-need-doc` - - (Please explain why) - -- [ ] `doc` - - (If this PR contains doc changes) - diff --git a/.github/workflows/documentbot.yml b/.github/workflows/documentbot.yml deleted file mode 100644 index ec77bd5989..0000000000 --- a/.github/workflows/documentbot.yml +++ /dev/null @@ -1,51 +0,0 @@ - -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -name: Auto Labeling - -on: - pull_request_target : - types: - - opened - - edited - - labeled - - - -# A GitHub token created for a PR coming from a fork doesn't have -# 'admin' or 'write' permission (which is required to add labels) -# To avoid this issue, you can use the `scheduled` event and run -# this action on a certain interval.And check the label about the -# document. - -jobs: - labeling: - if: ${{ github.repository == 'streamnative/kop' }} - permissions: - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: streamnative/github-workflow-libraries/doc-label-check@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - label-pattern: '- \[(.*?)\] ?`(.+?)`' # matches '- [x] `label`' - diff --git a/.github/workflows/release-note.yml b/.github/workflows/release-note.yml deleted file mode 100644 index ace01382e0..0000000000 --- a/.github/workflows/release-note.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: KoP Release Notes - -on: - push: - branches: - - master - path-ignores: - - 'docs/**' - - 'README.md' - - 'CONTRIBUTING.md' -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - name: release note - uses: toolmantim/release-drafter@v5.2.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1229d830d2..455cf93ff9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,9 +1,5 @@ name: Release on: - # TODO: remove it - pull_request: - branches: - - master push: tags: - '*'