Deploy Ubuntu Deb #1
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: Deploy Ubuntu Deb | |
on: | |
workflow_dispatch: | |
jobs: | |
deploy_ubuntu_deb: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Install dependecies | |
run: sudo apt-get update && sudo apt-get install cmake libgtest-dev libboost-all-dev libboost-regex-dev -y | |
- name: Get repository code | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Build project | |
run: | | |
cmake . | |
cmake --build . --target package | |
- name: Test project | |
run: ctest | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
with: | |
tag_name: 'deb-${{ github.run_number }}' | |
release_name: 'Release Ubuntu Deb ${{ github.run_number }}' | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset Ubuntu | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
with: | |
upload_url: '${{ steps.create_release.outputs.upload_url }}' | |
asset_path: './DuplicateFileFinder-1.0.0-Linux.deb' | |
asset_name: 'DuplicateFileFinder-${{ github.run_number }}-Linux.deb' | |
asset_content_type: application/vnd.debian.binary-package |