Skip to content

Build and Create AppImage #18

Build and Create AppImage

Build and Create AppImage #18

Workflow file for this run

name: Build and Create AppImage
# Define a manual trigger with input for version
on:
workflow_dispatch:
inputs:
version:
description: 'The version for the release'
required: true
default: 'v2.0.0'
release_notes:
description: 'Release notes or description for this version'
required: false
default: '## Release Note:'
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository code
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Pull Docker image from Docker Hub
- name: Set up Docker
uses: docker/setup-buildx-action@v2
- name: Pull Docker image
run: docker pull naderzare/ubuntu22-grpc-thrift:latest
# Step 3: Run the build.sh script inside the Docker container
- name: Build project
run: |
docker run --rm -v ${{ github.workspace }}:/workspace naderzare/ubuntu22-grpc-thrift:latest \
bash -c "ls && cd /workspace/utils && ls && chmod +x build.sh && ./build.sh && pwd && ldd ../build/bin/sample_player && cd /workspace/utils/app-image && chmod +x create_app_images.sh && ./create_app_images.sh"
# Step 5: Upload the tar.gz file as a release asset
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: ${{ github.workspace }}/utils/app-image/soccer-simulation-proxy.tar.gz
tag_name: ${{ github.event.inputs.version }}
name: "Version ${{ github.event.inputs.version }}"
body: ${{ github.event.inputs.release_notes }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare
run: bash -c "rm -rf ${{ github.workspace }}/build ${{ github.workspace }}/utils/librc* ${{ github.workspace }}/utils/app-image/soccer-simulation-proxy"
- name: Pull Docker image ubuntu 20
run: docker pull naderzare/ubuntu-grpc-thrift:latest
# Step 3: Run the build.sh script inside the Docker container
- name: Build project ubuntu 20
run: |
docker run --rm -v ${{ github.workspace }}:/workspace naderzare/ubuntu-grpc-thrift:latest \
bash -c "ls && cd /workspace/utils && ls && chmod +x build.sh && ./build.sh && pwd && ldd ../build/bin/sample_player && cd /workspace/utils/app-image && chmod +x create_app_images.sh && ./create_app_images.sh"
# Step 5: Upload the tar.gz file as a release asset
- name: Create GitHub Release ubuntu 20
uses: softprops/action-gh-release@v1
with:
files: ${{ github.workspace }}/utils/app-image/soccer-simulation-proxy.tar.gz
tag_name: u20-${{ github.event.inputs.version }}
name: "Version u20 ${{ github.event.inputs.version }}"
body: ${{ github.event.inputs.release_notes }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}