Skip to content

Commit

Permalink
build rpm yml
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiXinChan committed Sep 22, 2023
1 parent 789419e commit de3c388
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build_rpm.yml
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

0 comments on commit de3c388

Please sign in to comment.