release #10
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 dweb-app-daved" | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: [ created ] | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: 'macos-latest' | |
| args: '--target x86_64-apple-darwin' | |
| target: 'x86_64-apple-darwin' | |
| os_name: 'macos-intel' | |
| # - platform: 'macos-latest' | |
| # args: '--target aarch64-apple-darwin' | |
| # target: 'aarch64-apple-darwin' | |
| # os_name: 'macos-silicon' | |
| # - platform: 'ubuntu-22.04' | |
| # args: '' | |
| # target: 'x86_64-unknown-linux-gnu' | |
| # os_name: 'linux' | |
| # - platform: 'windows-latest' | |
| # args: '' | |
| # target: 'x86_64-pc-windows-msvc' | |
| # os_name: 'windows' | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install Linux dependencies | |
| if: startsWith(matrix.platform, 'ubuntu') | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf \ | |
| libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev | |
| - name: Install frontend dependencies | |
| run: | |
| cd dweb-app && | |
| npm install | |
| # - name: Import Apple Developer Certificate | |
| # if: matrix.platform == 'macos-latest' | |
| # env: | |
| # APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
| # APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| # KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | |
| # run: | | |
| # echo $APPLE_CERTIFICATE | base64 --decode > certificate.p12 | |
| # security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain | |
| # security default-keychain -s build.keychain | |
| # security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain | |
| # security set-keychain-settings -t 3600 -u build.keychain | |
| # security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign | |
| # security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain | |
| # security find-identity -v -p codesigning build.keychain | |
| # - name: Verify Certificate | |
| # if: matrix.platform == 'macos-latest' | |
| # run: | | |
| # CERT_INFO=$(security find-identity -v -p codesigning build.keychain | grep "Apple Development") | |
| # CERT_ID=$(echo "$CERT_INFO" | awk -F'"' '{print $2}') | |
| # echo "CERT_ID=$CERT_ID" >> $GITHUB_ENV | |
| # echo "Certificate imported." | |
| - name: Build Tauri app | |
| run: | |
| cd dweb-app && | |
| npm install @tauri-apps/cli@latest @tauri-apps/api@latest && | |
| npm run tauri build -- ${{ matrix.args }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| # APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
| # APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| # APPLE_SIGNING_IDENTITY: ${{ env.CERT_ID }} | |
| # APPLE_ID: ${{ secrets.APPLE_ID }} | |
| # APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | |
| # APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| - name: Upload artifacts (macOS) | |
| if: matrix.platform == 'macos-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.os_name }}-${{ matrix.target }} | |
| path: | | |
| dweb-app/src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg | |
| - name: Upload artifacts (Linux) | |
| if: startsWith(matrix.platform, 'ubuntu') | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.os_name }}-${{ matrix.target }} | |
| path: | | |
| dweb-app/src-tauri/target/release/bundle/deb/*.deb | |
| dweb-app/src-tauri/target/release/bundle/appimage/*.AppImage | |
| - name: Upload artifacts (Windows) | |
| if: matrix.platform == 'windows-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.os_name }}-${{ matrix.target }} | |
| path: | | |
| dweb-app/src-tauri/target/release/*.exe | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get version | |
| id: get_version | |
| run: | | |
| VERSION=$(node -p "require('./dweb-app/src-tauri/tauri.conf.json').version") | |
| echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Display structure of downloaded files | |
| run: ls -laR ../artifacts | |
| - name: Create properly named assets | |
| run: | | |
| VERSION="${{ steps.get_version.outputs.VERSION }}" | |
| # Create release directory | |
| mkdir -p release-assets | |
| # macOS Intel DMG | |
| find ../artifacts/macos-intel-x86_64-apple-darwin -name "*.dmg" -exec cp {} release-assets/dweb-app_${VERSION}_macos-x86_64-apple-darwin.dmg \; | |
| # # macOS Silicon DMG | |
| # find ../artifacts/macos-silicon-aarch64-apple-darwin -name "*.dmg" -exec cp {} ../resease-assets/dweb-app_${VERSION}_macos-aarch64-apple-darwin.dmg \; | |
| # # Linux AppImage | |
| # find ../artifacts/linux-x86_64-unknown-linux-gnu -name "*.AppImage" -exec cp {} ../resease-assets/dweb-app_${VERSION}_linux-x86_64-unknown-linux-gnu.AppImage \; | |
| # # Linux Deb | |
| # find ../artifacts/linux-x86_64-unknown-linux-gnu -name "*.deb" -exec cp {} ../resease-assets/dweb-app_${VERSION}_linux-x86_64-unknown-linux-gnu.deb \; | |
| # # Windows EXE | |
| # find ../artifacts/windows-x86_64-pc-windows-msvc -name "*.exe" -exec cp {} ../resease-assets/dweb-app_${VERSION}_windows-x86_64-pc-windows-msvc.exe \; | |
| # List final assets | |
| echo "Release assets created:" | |
| ls -la ../resease-assets/ | |
| - name: Create Release | |
| id: create_release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: app-v${{ steps.get_version.outputs.VERSION }} | |
| name: dweb App v${{ steps.get_version.outputs.VERSION }} | |
| body: | | |
| Download Audonomi dweb app for your platform: | |
| ## 🍎 macOS | |
| - **Intel**: [`dweb-app_${{ steps.get_version.outputs.VERSION }}_macos-x86_64-apple-darwin.dmg`](https://github.com/${{ github.repository }}/releases/download/app-v${{ steps.get_version.outputs.VERSION }}/dweb-app_${{ steps.get_version.outputs.VERSION }}_macos-x86_64-apple-darwin.dmg) | |
| - **Apple Silicon**: [`dweb-app_${{ steps.get_version.outputs.VERSION }}_macos-aarch64-apple-darwin.dmg`](https://github.com/${{ github.repository }}/releases/download/app-v${{ steps.get_version.outputs.VERSION }}/dweb-app_${{ steps.get_version.outputs.VERSION }}_macos-aarch64-apple-darwin.dmg) | |
| ## 🐧 Linux | |
| - **x64 AppImage**: [`dweb-app_${{ steps.get_version.outputs.VERSION }}_linux-x86_64-unknown-linux-gnu.AppImage`](https://github.com/${{ github.repository }}/releases/download/app-v${{ steps.get_version.outputs.VERSION }}/dweb-app_${{ steps.get_version.outputs.VERSION }}_linux-x86_64-unknown-linux-gnu.AppImage) | |
| - **x64 Debian Package**: [`dweb-app_${{ steps.get_version.outputs.VERSION }}_linux-x86_64-unknown-linux-gnu.deb`](https://github.com/${{ github.repository }}/releases/download/app-v${{ steps.get_version.outputs.VERSION }}/dweb-app_${{ steps.get_version.outputs.VERSION }}_linux-x86_64-unknown-linux-gnu.deb) | |
| ## 🪟 Windows | |
| - **x64 Executable**: [`dweb-app_${{ steps.get_version.outputs.VERSION }}_windows-x86_64-pc-windows-msvc.exe`](https://github.com/${{ github.repository }}/releases/download/app-v${{ steps.get_version.outputs.VERSION }}/dweb-app_${{ steps.get_version.outputs.VERSION }}_windows-x86_64-pc-windows-msvc.exe) | |
| draft: true | |
| prerelease: false | |
| files: | | |
| release-assets/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |