build also for ubuntu #1
This file contains hidden or 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: Publish package | |
| on: | |
| push: | |
| paths: | |
| - build.sh | |
| - .github/workflows/publish.yml | |
| jobs: | |
| build-scrcpy-debian: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: debian:sid | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Set Version | |
| id: set_version | |
| run: | | |
| VERSION=$(grep -oP '(?<=VERSION=").*(?=")' build.sh) | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| - name: Install Dependencies | |
| run: | | |
| apt update | |
| apt install wget dpkg ffmpeg libsdl2-2.0-0 adb wget \ | |
| gcc git pkg-config meson ninja-build libsdl2-dev \ | |
| libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev \ | |
| libswresample-dev libusb-1.0-0 libusb-1.0-0-dev -y | |
| - name: Build Deb File | |
| run: | | |
| bash build.sh | |
| mv scrcpy.deb scrcpy_${{ env.VERSION }}_debian_amd64.deb | |
| - name: Automatic Release | |
| uses: marvinpinto/action-automatic-releases@latest | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| automatic_release_tag: "${{ env.VERSION }}" | |
| prerelease: false | |
| title: "scrcpy build v${{ env.VERSION }}" | |
| files: | | |
| *.deb | |
| build-scrcpy-ubuntu: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Set Version | |
| id: set_version | |
| run: | | |
| VERSION=$(grep -oP '(?<=VERSION=").*(?=")' build.sh) | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| - name: Install Dependencies | |
| run: | | |
| apt update | |
| apt install wget dpkg ffmpeg libsdl2-2.0-0 adb wget \ | |
| gcc git pkg-config meson ninja-build libsdl2-dev \ | |
| libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev \ | |
| libswresample-dev libusb-1.0-0 libusb-1.0-0-dev -y | |
| - name: Build Deb File | |
| run: | | |
| bash build.sh | |
| mv scrcpy.deb scrcpy_${{ env.VERSION }}_ubuntu_amd64.deb | |
| - name: Automatic Release | |
| uses: marvinpinto/action-automatic-releases@latest | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| automatic_release_tag: "${{ env.VERSION }}" | |
| prerelease: false | |
| title: "scrcpy build v${{ env.VERSION }}" | |
| files: | | |
| *.deb |