Skip to content

Commit

Permalink
Add workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
quic-wya committed Jan 10, 2025
1 parent bedff5d commit 249e9cd
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/cmake-ubuntu-platform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: CMake on ubuntu platforms

on:
push:
# branches: [ "main" ]
tags:
- 'v*'

env:
BUILD_TYPE: Debug

jobs:
build:
runs-on: ubuntu-22.04

steps:
- name: checkout branch
uses: actions/checkout@v4

- name: get_tag
run: echo "tag=$(git tag)" >> $GITHUB_ENV

- name: Install Dependencies and Build
run: |
sudo apt-get install -y gcc-multilib g++-multilib
bash build.sh
tar -czvf crash-plugins_${{ env.tag }}.tar.gz output/arm64/plugins.so \
output/arm/plugins.so
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: crash-plugins_${{ env.tag }}.tar.gz
path: crash-plugins_${{ env.tag }}.tar.gz

release:
needs: build
runs-on: ubuntu-22.04

steps:
- name: checkout branch
uses: actions/checkout@v4

- name: get_tag
run: echo "plugin_tag=$(git tag)" >> $GITHUB_ENV

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: crash-plugins_${{ env.plugin_tag }}.tar.gz

- name: Release the Crash-plugins
id: release-crash
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.plugin_tag }}
release_name: crash-plugins-${{ env.plugin_tag }}
files: |
crash-plugins_${{ env.plugin_tag }}.tar.gz
- name: Upload Release Asset
id: upload
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release-crash.outputs.upload_url }}
asset_path: crash-plugins_${{ env.plugin_tag }}.tar.gz
asset_name: crash-plugins_${{ env.plugin_tag }}.tar.gz
asset_content_type: application/gzip #zip

0 comments on commit 249e9cd

Please sign in to comment.