Skip to content

Build and Release RPM #375

Build and Release RPM

Build and Release RPM #375

Workflow file for this run

name: Build and Release RPM
on:
push:
branches:
- create-tag-name-0513
schedule:
- cron: '* 16 * * *'
jobs:
Build-rpm:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
with:
ref: create-tag-name-0513
- name: run scripts
id: set_value
run: |
# mkdir /tmp/release
git config --global user.name "zhangbaowen"
git config --global user.email "zhangbaowen@hashdata.cn"
pwd
ls -al
source script/build_cbdb_env.sh
source script/update_tag_number.sh
echo "CBDB主版本号是 $main_version"
echo "新tag是 $new_tag"
echo "::set-output name=NEW_TAG::${new_tag}"
echo "::set-output name=MAIN_VERSION::${main_version}"
git clone git@github.com:cloudberrydb/cloudberrydb.git
cd cloudberrydb
./configure --with-perl --with-python --with-libxml --with-gssapi --prefix=/home/gpadmin/cbdb-install
make -j16
make install
pwd
ruby -v
fpm --version
echo "制作rpm包"
mkdir -p tmp/usr/local/cloudberrydb
sudo cp -a /home/gpadmin/cbdb-install/* tmp/usr/local/cloudberrydb
fpm -s dir -t rpm -n cloudberrydb -v $(echo $main_version | sed 's/^v//') -p ./ -C tmp
pwd
ls -al
cp cloudberrydb-$(echo $main_version | sed 's/^v//')-1.x86_64.rpm /tmp/release
ls -al /tmp/release
- name: DEBUG
run: |
echo "${{ steps.set_value.outputs.NEW_TAG }}"
echo "${{ steps.set_value.outputs.MAIN_VERSION }}"
- name: release
uses: softprops/action-gh-release@v1
with:
files: "/tmp/release/*.rpm"
name: release "${{ steps.set_value.outputs.NEW_TAG }}"
tag_name: "${{ steps.set_value.outputs.NEW_TAG }}"
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}