mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-04-21 13:14:04 +02:00
chore: migrate from bun to pnpm for dependency management in workflows
This commit is contained in:
parent
3552a3779b
commit
9db390c1c2
3 changed files with 35 additions and 59 deletions
33
.github/workflows/build.yml
vendored
33
.github/workflows/build.yml
vendored
|
@ -56,14 +56,11 @@ jobs:
|
||||||
save-if: "true"
|
save-if: "true"
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.bun
|
path: ~/.pnpm-store
|
||||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-bun-
|
${{ runner.os }}-pnpm-
|
||||||
- run: |
|
- run: npm install -g pnpm && pnpm install
|
||||||
curl -fsSL https://bun.sh/install | bash
|
|
||||||
source ~/.bashrc
|
|
||||||
bun install
|
|
||||||
- name: Import Apple Developer Certificate
|
- name: Import Apple Developer Certificate
|
||||||
env:
|
env:
|
||||||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
|
@ -146,14 +143,11 @@ jobs:
|
||||||
save-if: "true"
|
save-if: "true"
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.bun
|
path: ~/.pnpm-store
|
||||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-bun-
|
${{ runner.os }}-pnpm-
|
||||||
- run: |
|
- run: npm install -g pnpm && pnpm install
|
||||||
curl -fsSL https://bun.sh/install | bash
|
|
||||||
source ~/.bashrc
|
|
||||||
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 }}
|
||||||
|
@ -205,19 +199,16 @@ jobs:
|
||||||
save-if: "true"
|
save-if: "true"
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.bun
|
path: ~/.pnpm-store
|
||||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-bun-
|
${{ runner.os }}-pnpm-
|
||||||
- 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: |
|
- run: npm install -g pnpm && pnpm install
|
||||||
curl -fsSL https://bun.sh/install | bash
|
|
||||||
source ~/.bashrc
|
|
||||||
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 }}
|
||||||
|
|
57
.github/workflows/release.yml
vendored
57
.github/workflows/release.yml
vendored
|
@ -57,16 +57,11 @@ jobs:
|
||||||
save-if: "true"
|
save-if: "true"
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.bun
|
path: ~/.pnpm-store
|
||||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-bun-
|
${{ runner.os }}-pnpm-
|
||||||
- run: curl -fsSL https://bun.sh/install | bash
|
- run: npm install -g pnpm && pnpm install
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
curl -fsSL https://bun.sh/install | bash
|
|
||||||
source ~/.bashrc
|
|
||||||
bun install
|
|
||||||
- name: Import Apple Developer Certificate
|
- name: Import Apple Developer Certificate
|
||||||
env:
|
env:
|
||||||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
|
@ -88,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
|
||||||
|
@ -130,16 +125,11 @@ jobs:
|
||||||
save-if: "true"
|
save-if: "true"
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.bun
|
path: ~/.pnpm-store
|
||||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-bun-
|
${{ runner.os }}-pnpm-
|
||||||
- run: curl -fsSL https://bun.sh/install | bash
|
- run: npm install -g pnpm && pnpm install
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
curl -fsSL https://bun.sh/install | bash
|
|
||||||
source ~/.bashrc
|
|
||||||
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,21 +189,16 @@ jobs:
|
||||||
save-if: "true"
|
save-if: "true"
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.bun
|
path: ~/.pnpm-store
|
||||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-bun-
|
${{ runner.os }}-pnpm-
|
||||||
- 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: curl -fsSL https://bun.sh/install | bash
|
- run: npm install -g pnpm && pnpm install
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
curl -fsSL https://bun.sh/install | bash
|
|
||||||
source ~/.bashrc
|
|
||||||
bun install
|
|
||||||
- name: Generate Changelog
|
- name: Generate Changelog
|
||||||
id: changelog
|
id: changelog
|
||||||
run: |
|
run: |
|
||||||
|
@ -258,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")
|
||||||
|
@ -269,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 }')
|
||||||
|
@ -294,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}
|
||||||
|
@ -327,4 +312,4 @@ jobs:
|
||||||
artifacts/**/*.deb
|
artifacts/**/*.deb
|
||||||
artifacts/**/*.AppImage
|
artifacts/**/*.AppImage
|
||||||
artifacts/**/*.rpm
|
artifacts/**/*.rpm
|
||||||
body: ${{ env.RELEASE_BODY }}
|
body: ${{ env.RELEASE_BODY }}
|
|
@ -5,8 +5,8 @@
|
||||||
"build": {
|
"build": {
|
||||||
"frontendDist": "../dist",
|
"frontendDist": "../dist",
|
||||||
"devUrl": "http://localhost:3000",
|
"devUrl": "http://localhost:3000",
|
||||||
"beforeDevCommand": "bun nuxt dev",
|
"beforeDevCommand": "pnpm nuxt dev",
|
||||||
"beforeBuildCommand": "bun nuxt generate"
|
"beforeBuildCommand": "pnpm nuxt generate"
|
||||||
},
|
},
|
||||||
"app": {
|
"app": {
|
||||||
"windows": [
|
"windows": [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue