fixed bash pipes cutting off extra information #2
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: 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 |