name: Create pre-release on: workflow_dispatch: jobs: create-release-draft: name: pre-release runs-on: ubuntu-latest outputs: release_upload_url: ${{ steps.create_release.outputs.upload_url }} steps: - uses: actions/checkout@v2 if: ${{ !env.ACT }} - id: create_release uses: marvinpinto/action-automatic-releases@latest if: ${{ !env.ACT }} with: repo_token: ${{ secrets.GITHUB_TOKEN }} automatic_release_tag: latest draft: true title: Latest Pre-Release files: | LICENSE build-daemon: needs: create-release-draft strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 if: ${{ !env.ACT }} - name: Cache build data if: ${{ !env.ACT }} uses: actions/cache@v2 with: path: | target ~/.cargo/ key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo- - name: setup python uses: actions/setup-python@v2 with: python-version: '^3.7' - name: Build Daemon run: python scripts/build.py daemon --verbose --install-tooling - uses: vimtor/action-zip@v1 with: files: out/ dest: mediarepo-daemon-${{ runner.os }}.zip - name: Upload Release Asset id: upload-release-asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create-release-draft.outputs.release_upload_url }} asset_path: ./mediarepo-daemon-${{ runner.os }}.zip asset_name: mediarepo-daemon-${{ runner.os }}.zip asset_content_type: application/zip build-ui: needs: create-release-draft strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 if: ${{ !env.ACT }} - name: Cache Dependencies if: ${{ !env.ACT }} id: cache-dependencies uses: actions/cache@v2 with: path: | node_modules src-tauri/target /home/runner/.cargo ~/.cargo key: ${{ runner.os }}-release-dependencies-${{ hashFiles('src-tauri/Cargo.lock') }}-${{ hashFiles('yarn.lock') }} restore-keys: | ${{ runner.os }}-release-dependencies- ${{ runner.os }}-dependencies- - name: setup python uses: actions/setup-python@v2 with: python-version: '^3.7' - name: Use Node.js 16 uses: actions/setup-node@v1 with: node-version: 16 - name: Install OS-specific dependencies uses: knicknic/os-specific-run@v1.0.3 with: linux: | sudo apt-get update DEBIAN_FRONTEND=noninteractive sudo apt-get install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y - name: Build project run: python scripts/build.py ui --verbose --install-tooling - uses: vimtor/action-zip@v1 with: files: out/ dest: mediarepo-ui-${{ runner.os }}.zip - name: Upload Release Asset id: upload-release-asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create-release-draft.outputs.release_upload_url }} asset_path: ./mediarepo-ui-${{ runner.os }}.zip asset_name: mediarepo-ui-${{ runner.os }}.zip asset_content_type: application/zip