@@ -32,54 +32,50 @@ jobs:
3232 go-version : ' stable'
3333 cache-dependency-path : src/backend/go.sum
3434
35- - name : Get version from package.json
35+ - name : Update version from tag
3636 run : |
37- VERSION=$(grep -Po '"version"\s*:\s*"\K[^"]+' package.json)
37+ TAG_NAME=${{ github.ref_name }}
38+
39+ if [[ $TAG_NAME == v* ]]; then
40+ VERSION=${TAG_NAME#v}
41+ echo "Updating package.json to version $VERSION"
42+ sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" package.json
43+ else
44+ VERSION=$(grep -Po '"version"\s*:\s*"\K[^"]+' package.json)
45+ fi
46+
3847 echo "PACKAGE_VERSION=${VERSION}" >> $GITHUB_ENV
3948
40- - name : Cache Bun dependencies
41- uses : actions/cache@v4
42- with :
43- path : ~/.bun/install/cache
44- key : bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
45- restore-keys : |
46- bun-${{ runner.os }}-
47-
48- - name : Cache Electron & electron-builder
49+ - name : Cache dependencies
4950 uses : actions/cache@v4
5051 with :
5152 path : |
53+ ~/.bun/install/cache
5254 ~/.cache/electron
5355 ~/.cache/electron-builder
54- key : electron- ${{ runner.os }}-${{ hashFiles('package.json') }}
56+ key : ${{ runner.os }}-deps- ${{ hashFiles('bun.lock', 'package.json') }}
5557 restore-keys : |
56- electron-${{ runner.os }}-
57-
58- - name : Cache APT packages
59- uses : actions/cache@v4
60- id : apt-cache
61- with :
62- path : /var/cache/apt/archives
63- key : apt-release-${{ runner.os }}-rpm-libarchive-gtk3-appindicator
58+ ${{ runner.os }}-deps-
6459
6560 - name : Install system dependencies (Linux)
6661 run : |
6762 sudo apt-get update
68- sudo apt-get install -y rpm libarchive-tools libgtk-3-dev libayatana-appindicator3-dev
63+ sudo apt-get install -y --no-install-recommends \
64+ rpm libarchive-tools libgtk-3-dev libayatana-appindicator3-dev
65+ env :
66+ DEBIAN_FRONTEND : noninteractive
6967
7068 - name : Install dependencies
7169 run : bun install --frozen-lockfile
7270
7371 - name : Build App
7472 run : bun run build:all
7573 env :
76- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
74+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7775
7876 - name : Zip linux-unpacked
7977 run : |
80- cd dist
81- zip -r "linux-wallpaperengine-gui.zip" linux-unpacked
82- cd ..
78+ zip -r "dist/linux-wallpaperengine-gui.zip" dist/linux-unpacked
8379
8480 - name : Upload Release Assets
8581 uses : softprops/action-gh-release@v2
0 commit comments