[*] clean codes #34
Workflow file for this run
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: linux-wlr | |
| on: [push] | |
| permissions: | |
| contents: write | |
| jobs: | |
| action-run: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
| - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
| - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
| - name: Check out repository code | |
| uses: actions/checkout@v3 | |
| - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | |
| - run: echo "The ${{ github.workspace }} is now ready to test your code on the runner." | |
| - run: ls ${{ github.workspace }} | |
| - run: sudo apt update | |
| - run: sudo apt install libxcb-composite0-dev upx imagemagick libasound2-dev libpipewire-0.3-dev libx264-dev | |
| - run: sudo apt install qt6-base-dev qt6-tools-dev qt6-tools-dev-tools | |
| - run: echo "start install Rust..." | |
| - name: Install Rust | |
| uses: actions-rs/toolchain@v1 | |
| - run: echo "end install Rust..." | |
| - run: echo "start build..." | |
| - run: make desktop-build-release | |
| - run: echo "end build..." | |
| - name: Get the release version from the tag | |
| shell: bash | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
| - run: echo "start packing..." | |
| - run: make app-name | |
| - run: make deb | |
| - name: Export package | |
| shell: bash | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: | | |
| cd target | |
| binary_name=`cat app-name` | |
| output="$binary_name-wlr-${{ env.VERSION }}-x86_64-linux.tar.gz" | |
| cp -rf release/$binary_name $binary_name | |
| tar -zcf $output $binary_name | |
| cp $output .. | |
| echo "ASSET=$output" >> $GITHUB_ENV | |
| output="$binary_name-wlr-${{ env.VERSION }}-x86_64-linux.deb" | |
| cp -rf $binary_name.deb $output | |
| cp $output .. | |
| echo "DEB_ASSET=$output" >> $GITHUB_ENV | |
| - run: echo "end packing..." | |
| - name: Upload the package | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| ${{ env.ASSET }} | |
| ${{ env.DEB_ASSET }} | |
| - run: echo "🍏 This job's status is ${{ job.status }}." |