A music player that connects to your cloud/distributed storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update github action

+154 -3
+154 -3
.github/workflows/native-build.yml
··· 8 8 9 9 jobs: 10 10 build: 11 - runs-on: ubuntu-20.04 11 + runs-on: ubuntu-latest 12 12 13 13 steps: 14 14 - uses: actions/checkout@v2 15 + 16 + # Cache 17 + - id: stack_cache_key 18 + run: echo ::set-output name=key::$(md5sum stack.yaml.lock | awk '{print $1}') 19 + 20 + - uses: actions/cache@v2 21 + with: 22 + path: ~/.stack 23 + key: ${{ matrix.os }}-${{ steps.stack_cache_key.outputs.key }} 24 + 25 + - id: cache_key 26 + run: echo ::set-output name=key::$(git branch) 27 + 28 + - uses: actions/cache@v2 29 + with: 30 + path: | 31 + ./.stack-work/dist 32 + **/node_modules 33 + key: ${{ matrix.os }}-${{ steps.cache_key.outputs.key }} 34 + 35 + # Nix 15 36 - uses: cachix/install-nix-action@v10 16 37 with: 17 38 nix_path: nixpkgs=channel:nixos-unstable 18 - - run: nix-shell --run "sudo apt-get install g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg netbase" 39 + - uses: mstksg/get-package@v1 40 + with: 41 + apt-get: libgmp-dev 42 + - uses: mstksg/setup-stack@v1 43 + 44 + # Tasks 19 45 - run: nix-shell --run "just install-deps" 20 46 - run: nix-shell --run "just build-prod" 21 - - run: ls ./build 47 + 48 + # Upload artifacts 49 + - uses: actions/upload-artifact@v2 50 + with: 51 + name: build 52 + path: build/ 53 + 54 + 55 + create-release: 56 + needs: build 57 + runs-on: ubuntu-latest 58 + 59 + outputs: 60 + RELEASE_UPLOAD_ID: ${{ steps.create_release.outputs.id }} 61 + 62 + steps: 63 + - uses: actions/checkout@v2 64 + - run: mkdir compressed 65 + 66 + # Download artifacts 67 + - uses: actions/download-artifact@v2 68 + with: 69 + name: build 70 + path: build/ 71 + 72 + # Create zip 73 + - uses: montudor/action-zip@v0.1.0 74 + with: 75 + args: zip -qq -r ./compressed/diffuse-web.zip ./build 76 + 77 + # Create tar.gz 78 + - uses: master-atul/tar-action@v1.0.2 79 + with: 80 + command: c 81 + cwd: . 82 + files: ./build 83 + outPath: compressed/diffuse-web.tar.gz 84 + 85 + # Get Diffuse's version number 86 + - run: echo ::set-env name=PACKAGE_VERSION::$(node -p "require('./package.json').version") 87 + 88 + # Create release 89 + - uses: actions/create-release@v1.1.2 90 + id: create_release 91 + env: 92 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 93 + with: 94 + tag_name: "${{ env.PACKAGE_VERSION }}" 95 + release_name: "v${{ env.PACKAGE_VERSION }}" 96 + body: "See the assets to download this version and install." 97 + draft: true 98 + prerelease: true 99 + 100 + # Upload assets 101 + - uses: actions/upload-release-asset@v1 102 + env: 103 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 104 + with: 105 + upload_url: ${{ steps.create_release.outputs.upload_url }} 106 + asset_path: ./compressed/diffuse-web.zip 107 + asset_name: diffuse-web.zip 108 + asset_content_type: application/zip 109 + 110 + - uses: actions/upload-release-asset@v1 111 + env: 112 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 113 + with: 114 + upload_url: ${{ steps.create_release.outputs.upload_url }} 115 + asset_path: ./compressed/diffuse-web.tar.gz 116 + asset_name: diffuse-web.tar.gz 117 + asset_content_type: application/gzip 118 + 119 + 120 + tauri: 121 + needs: create-release 122 + 123 + strategy: 124 + fail-fast: false 125 + matrix: 126 + platform: [macos-latest, ubuntu-latest, windows-latest] 127 + 128 + runs-on: ${{ matrix.platform }} 129 + 130 + steps: 131 + - uses: actions/checkout@v2 132 + 133 + # Cache 134 + - uses: actions/cache@v2 135 + with: 136 + path: | 137 + ~/.cargo/registry 138 + ~/.cargo/git 139 + target 140 + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} 141 + 142 + # Rust & Node 143 + - uses: actions-rs/toolchain@v1 144 + with: 145 + toolchain: stable 146 + - uses: actions/setup-node@v1 147 + with: 148 + node-version: 14 149 + 150 + # Download artifacts 151 + - uses: actions/download-artifact@v2 152 + with: 153 + name: build 154 + path: build/ 155 + 156 + # Dependencies 157 + - run: cargo install tauri-bundler --force 158 + - name: install webkit2gtk (ubuntu only) 159 + if: matrix.platform == 'ubuntu-latest' 160 + run: | 161 + sudo apt-get update 162 + sudo apt-get install -y webkit2gtk-4.0 163 + 164 + # Tasks 165 + - uses: tauri-apps/tauri-action@v0.0.9 166 + env: 167 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 168 + with: 169 + distPath: ../build/ 170 + iconPath: ./src/Static/Images/icon.png 171 + releaseId: ${{ needs.create-release.outputs.RELEASE_UPLOAD_ID }} 172 + includeDebug: true