forked from oceanbase/oceanbase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
789419e
commit de3c388
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build and Publish RPM Package | ||
|
||
on: | ||
push: | ||
branches: | ||
- test_rpm | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up RPM Build Environment | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install rpm -y | ||
- name: Build RPM Package | ||
run: | | ||
DOB_RELEASEID=$(date +"%y%m%d%H") | ||
BUILD_NUMBER=$(date +"%y%m%d%H") | ||
./build.sh rpm -DOB_RELEASEID=$DOB_RELEASEID -DBUILD_NUMBER=$BUILD_NUMBER --init --make rpm | ||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: v1.0 # 替换成你的发布版本号 | ||
release_name: Release version 1.0 # 替换成你的发布名称 | ||
body: | | ||
This is the release note for version 1.0 | ||
- name: Upload RPM Package to Release | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./path/to/rpm/package.rpm # 替换成实际的 RPM 包路径 | ||
asset_name: my-rpm-package.rpm # 替换成你的 RPM 包的名称 | ||
asset_content_type: application/x-rpm |