-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6df8c1a
commit 2722d2a
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build and Release EARL | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Set up CMake | ||
- name: Install dependencies | ||
run: sudo apt-get update && sudo apt-get install -y cmake make tar | ||
|
||
# Run build commands | ||
- name: Build EARL | ||
run: | | ||
mkdir -p build | ||
cd build | ||
cmake -S .. -B . -DPORTABLE=ON | ||
make | ||
VERSION=$(grep 'version' ../CMakeLists.txt | head -n 1 | cut -d '"' -f 2) # | ||
tar -czvf EARL-${VERSION}-linux.tar.gz -C build . | ||
# Upload to GitHub Releases | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: ${{ github.sha }} | ||
release_name: Release ${{ github.sha }} | ||
body: Automated release of EARL | ||
draft: false | ||
prerelease: false | ||
generate_release_notes: true | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./build/EARL-${VERSION}-linux.tar.gz | ||
asset_name: EARL-${VERSION}-linux.tar.gz | ||
asset_content_type: application/gzip |