chipmunk rpm/deb package creation and publish to repository #9
Workflow file for this run
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
name: Distribute deb and RPM package for Chipmunk | |
run-name: chipmunk rpm/deb package creation and publish to repository | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build_x86_64: | |
runs-on: ubuntu-latest | |
name: Build on ubuntu-latest x86_64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# add any setup requirements for code changes | |
- name: Setup pre-requisites and fetch latest released chipmunk package | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential fakeroot devscripts debhelper dh-make git | |
bash common/get_release.sh ${{github.ref_name}} | |
# add a step for building the required package for another unsupported linux platform like the step below | |
- name: Build RPM package | |
run: | | |
bash rpm_rhel/scripts/distribute_to_rpm.sh ${{env.VERSION}} ${{ github.ref_name }} | |
- name: Prepare environment | |
id: prepare | |
run: | | |
bash apt/scripts/untar_release.sh ${{env.TAR_FILE}} | |
env: | |
TAR_FILE: ${{ env.TAR_FILE }} | |
- name: Build .deb package | |
run: | | |
sudo bash apt/scripts/build_deb_package.sh ../ ${{github.ref_name}} | |
# list the name of the package file that needs to be uploaded to chipmunk(for debugging purposes) | |
- name: list RPM package | |
working-directory: . | |
run: | | |
rm -rf /tmp/chipmunk_work_dir | |
echo "RPM_FILE=$(find -type f -name '*-x86_64.rpm' -printf '%f\n')" >> $GITHUB_ENV | |
echo "DEB_FILE=$(find -type f -name '*.deb' -printf '%f\n')" >> $GITHUB_ENV | |
- name: list tag_name | |
run: | | |
echo ${{ github.ref_name }} | |
# upload the package file by adding the file type to the file glob pattern in the below step. | |
# kindly ensure the package file is named as "[email protected]" | |
- name: Upload RPM to chipmunk using overwrite functionality | |
id: upload_rpm | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_name: esrlabs/chipmunk | |
repo_token: ${{ secrets.CHIPMUNK_TOKEN }} | |
file: ./chipmunk*.{rpm,deb} | |
tag: ${{ github.ref_name }} | |
overwrite: true | |
file_glob: true | |
# build_arm64: | |
# runs-on: ubuntu-22.04 | |
# name: Build on ubuntu-latest aarch64 | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: uraimo/run-on-arch-action@v2 | |
# name: Fetch architecture | |
# id: get_uname | |
# with: | |
# arch: aarch64 | |
# distro: ubuntu_latest | |
# githubToken: ${{ github.token }} | |
# run: | | |
# uname -a | |
# echo ::set-output name=uname::$(uname -a) | |
# - name: Create RPM package | |
# run: | | |
# bash distribute_to_rpm_arm64.sh | |
# - name: list RPM package | |
# working-directory: . | |
# run: | | |
# echo "RPM_FILE=$(find -type f -name '*-arm64.rpm' -printf '%f\n')" >> $GITHUB_ENV | |
# - name: list tag_name | |
# run: | | |
# echo ${{ github.ref_name }} | |
# - name: Upload RPM to chipmunk using overwrite functionality | |
# id: upload_rpm | |
# uses: svenstaro/upload-release-action@v2 | |
# with: | |
# repo_name: esrlabs/chipmunk | |
# repo_token: ${{ secrets.CHIPMUNK_TOKEN }} | |
# file: ./${{ env.RPM_FILE }} | |
# asset_name: ${{ env.RPM_FILE }} | |
# tag: ${{ github.ref_name }} | |
# overwrite: true |