chore: migrate from pnpm to bun for dependency management in workflows and update README instructions

This commit is contained in:
PandaDEV 2025-01-01 16:17:13 +10:00
parent 0a08ce95d2
commit 0f29e0af07
No known key found for this signature in database
GPG key ID: 13EFF9BAF70EE75C
4 changed files with 40 additions and 42 deletions

View file

@ -56,11 +56,11 @@ jobs:
save-if: "true" save-if: "true"
- uses: actions/cache@v4 - uses: actions/cache@v4
with: with:
path: ~/.pnpm-store path: ~/.bun
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: | restore-keys: |
${{ runner.os }}-pnpm- ${{ runner.os }}-bun-
- run: npm install -g pnpm && pnpm install - run: curl -fsSL https://bun.sh/install | bash && bun install
- name: Import Apple Developer Certificate - name: Import Apple Developer Certificate
env: env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
@ -143,11 +143,11 @@ jobs:
save-if: "true" save-if: "true"
- uses: actions/cache@v4 - uses: actions/cache@v4
with: with:
path: ~/.pnpm-store path: ~/.bun
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: | restore-keys: |
${{ runner.os }}-pnpm- ${{ runner.os }}-bun-
- run: npm install -g pnpm && pnpm install - run: curl -fsSL https://bun.sh/install | bash && bun install
- uses: tauri-apps/tauri-action@v0 - uses: tauri-apps/tauri-action@v0
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -199,16 +199,16 @@ jobs:
save-if: "true" save-if: "true"
- uses: actions/cache@v4 - uses: actions/cache@v4
with: with:
path: ~/.pnpm-store path: ~/.bun
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: | restore-keys: |
${{ runner.os }}-pnpm- ${{ runner.os }}-bun-
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt update sudo apt update
sudo apt install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libayatana-appindicator3-dev librsvg2-dev libasound2-dev rpm sudo apt install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libayatana-appindicator3-dev librsvg2-dev libasound2-dev rpm
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig" >> $GITHUB_ENV echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig" >> $GITHUB_ENV
- run: npm install -g pnpm && pnpm install - run: curl -fsSL https://bun.sh/install | bash && bun install
- uses: tauri-apps/tauri-action@v0 - uses: tauri-apps/tauri-action@v0
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -57,11 +57,11 @@ jobs:
save-if: "true" save-if: "true"
- uses: actions/cache@v4 - uses: actions/cache@v4
with: with:
path: ~/.pnpm-store path: ~/.bun
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: | restore-keys: |
${{ runner.os }}-pnpm- ${{ runner.os }}-bun-
- run: npm install -g pnpm && pnpm install - run: curl -fsSL https://bun.sh/install | bash && bun install
- name: Import Apple Developer Certificate - name: Import Apple Developer Certificate
env: env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
@ -83,7 +83,7 @@ jobs:
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with: with:
args: ${{ matrix.args }} args: ${{ matrix.args }}
- name: Rename macOS Artifacts - name: Rename macOS Artifacts
run: | run: |
mv src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/dmg/*.dmg src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/dmg/Qopy-${{ needs.prepare.outputs.version }}_${{ matrix.arch }}.dmg mv src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/dmg/*.dmg src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/dmg/Qopy-${{ needs.prepare.outputs.version }}_${{ matrix.arch }}.dmg
@ -125,11 +125,11 @@ jobs:
save-if: "true" save-if: "true"
- uses: actions/cache@v4 - uses: actions/cache@v4
with: with:
path: ~/.pnpm-store path: ~/.bun
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: | restore-keys: |
${{ runner.os }}-pnpm- ${{ runner.os }}-bun-
- run: npm install -g pnpm && pnpm install - run: curl -fsSL https://bun.sh/install | bash && bun install
- uses: tauri-apps/tauri-action@v0 - uses: tauri-apps/tauri-action@v0
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -189,16 +189,16 @@ jobs:
save-if: "true" save-if: "true"
- uses: actions/cache@v4 - uses: actions/cache@v4
with: with:
path: ~/.pnpm-store path: ~/.bun
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: | restore-keys: |
${{ runner.os }}-pnpm- ${{ runner.os }}-bun-
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt update sudo apt update
sudo apt install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libayatana-appindicator3-dev librsvg2-dev libasound2-dev rpm sudo apt install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libayatana-appindicator3-dev librsvg2-dev libasound2-dev rpm
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig" >> $GITHUB_ENV echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig" >> $GITHUB_ENV
- run: npm install -g pnpm && pnpm install - run: curl -fsSL https://bun.sh/install | bash && bun install
- name: Generate Changelog - name: Generate Changelog
id: changelog id: changelog
run: | run: |
@ -243,10 +243,10 @@ jobs:
id: release_body id: release_body
run: | run: |
VERSION="${{ needs.prepare.outputs.version }}" VERSION="${{ needs.prepare.outputs.version }}"
# Get the most recent release tag (v* tags only) # Get the most recent release tag (v* tags only)
LAST_TAG=$(git describe --match "v*" --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1` 2>/dev/null || echo "") LAST_TAG=$(git describe --match "v*" --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1` 2>/dev/null || echo "")
if [ -n "$LAST_TAG" ]; then if [ -n "$LAST_TAG" ]; then
echo "Debug: Found last release tag: $LAST_TAG" echo "Debug: Found last release tag: $LAST_TAG"
CHANGES=$(git log ${LAST_TAG}..HEAD --pretty=format:"- %s") CHANGES=$(git log ${LAST_TAG}..HEAD --pretty=format:"- %s")
@ -254,10 +254,10 @@ jobs:
echo "Debug: No previous release tag found, using first commit" echo "Debug: No previous release tag found, using first commit"
CHANGES=$(git log --pretty=format:"- %s") CHANGES=$(git log --pretty=format:"- %s")
fi fi
echo "Debug: Changelog content:" echo "Debug: Changelog content:"
echo "$CHANGES" echo "$CHANGES"
# Calculate hashes with corrected paths # Calculate hashes with corrected paths
WINDOWS_ARM_HASH=$(sha256sum "artifacts/windows-arm64-binaries/Qopy-${VERSION}_arm64.msi" | awk '{ print $1 }') WINDOWS_ARM_HASH=$(sha256sum "artifacts/windows-arm64-binaries/Qopy-${VERSION}_arm64.msi" | awk '{ print $1 }')
WINDOWS_64_HASH=$(sha256sum "artifacts/windows-x64-binaries/Qopy-${VERSION}_x64.msi" | awk '{ print $1 }') WINDOWS_64_HASH=$(sha256sum "artifacts/windows-x64-binaries/Qopy-${VERSION}_x64.msi" | awk '{ print $1 }')
@ -279,11 +279,11 @@ jobs:
RELEASE_BODY=$(cat <<-EOF RELEASE_BODY=$(cat <<-EOF
## ♻️ Changelog ## ♻️ Changelog
$CHANGES $CHANGES
## ⬇️ Downloads ## ⬇️ Downloads
- [Windows (x64)](https://github.com/${{ github.repository }}/releases/download/v${VERSION}/Qopy-${VERSION}_x64.msi) - ${WINDOWS_64_HASH} - [Windows (x64)](https://github.com/${{ github.repository }}/releases/download/v${VERSION}/Qopy-${VERSION}_x64.msi) - ${WINDOWS_64_HASH}
- [Windows (ARM64)](https://github.com/${{ github.repository }}/releases/download/v${VERSION}/Qopy-${VERSION}_arm64.msi) - ${WINDOWS_ARM_HASH} - [Windows (ARM64)](https://github.com/${{ github.repository }}/releases/download/v${VERSION}/Qopy-${VERSION}_arm64.msi) - ${WINDOWS_ARM_HASH}
- [macOS (Silicon)](https://github.com/${{ github.repository }}/releases/download/v${VERSION}/Qopy-${VERSION}_silicon.dmg) - ${MAC_SILICON_HASH} - [macOS (Silicon)](https://github.com/${{ github.repository }}/releases/download/v${VERSION}/Qopy-${VERSION}_silicon.dmg) - ${MAC_SILICON_HASH}
@ -312,4 +312,4 @@ jobs:
artifacts/**/*.deb artifacts/**/*.deb
artifacts/**/*.AppImage artifacts/**/*.AppImage
artifacts/**/*.rpm artifacts/**/*.rpm
body: ${{ env.RELEASE_BODY }} body: ${{ env.RELEASE_BODY }}

View file

@ -95,13 +95,13 @@ You can use GitHub Codespaces for online development:
[![][codespaces-shield]][codespaces-link] [![][codespaces-shield]][codespaces-link]
Or to get Qopy set up on your machine, you'll need to have Rust and pnpm installed. Then, follow these steps: Or to get Qopy set up on your machine, you'll need to have Rust and bun installed. Then, follow these steps:
```zsh ```zsh
git clone https://github.com/0pandadev/Qopy.git git clone https://github.com/0pandadev/Qopy.git
cd Qopy cd Qopy
pnpm i bun i
pnpm dev bun dev
``` ```
> \[!TIP] > \[!TIP]
@ -113,7 +113,7 @@ pnpm dev
To build for production simply execute: To build for production simply execute:
```zsh ```zsh
pnpm build bun build
``` ```
> \[!NOTE] > \[!NOTE]

View file

@ -5,8 +5,8 @@
"build": { "build": {
"frontendDist": "../dist", "frontendDist": "../dist",
"devUrl": "http://localhost:3000", "devUrl": "http://localhost:3000",
"beforeDevCommand": "pnpm nuxt dev", "beforeDevCommand": "bun nuxt dev",
"beforeBuildCommand": "pnpm nuxt generate" "beforeBuildCommand": "bun nuxt generate"
}, },
"app": { "app": {
"windows": [ "windows": [
@ -51,9 +51,7 @@
"plugins": { "plugins": {
"updater": { "updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDExNDIzNjA1QjE0NjU1OTkKUldTWlZVYXhCVFpDRWNvNmt0UE5lQmZkblEyZGZiZ2tHelJvT2YvNVpLU1RIM1RKZFQrb2tzWWwK", "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDExNDIzNjA1QjE0NjU1OTkKUldTWlZVYXhCVFpDRWNvNmt0UE5lQmZkblEyZGZiZ2tHelJvT2YvNVpLU1RIM1RKZFQrb2tzWWwK",
"endpoints": [ "endpoints": ["https://qopy.pandadev.net/"]
"https://qopy.pandadev.net/"
]
} }
}, },
"$schema": "../node_modules/@tauri-apps/cli/schema.json" "$schema": "../node_modules/@tauri-apps/cli/schema.json"