Merge branch 'main' of github.com:skykooler/Lightningbeam

This commit is contained in:
Skyler Lehmkuhl 2024-12-18 23:19:49 -05:00
commit e2eb0728ec
1 changed files with 29 additions and 6 deletions

View File

@ -33,6 +33,29 @@ jobs:
sudo apt-get update sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Set version for Windows build
if: matrix.platform == 'windows-latest'
run: |
# Get the version from the Git tag (e.g., v0.6.3-alpha)
VERSION=$(echo ${GITHUB_REF#refs/tags/})
# Replace '-alpha' with '-0' and '-beta' with '-1' only for Windows version
if [[ $VERSION == *"-alpha"* ]]; then
WINDOWS_VERSION=${VERSION%-alpha}-0
elif [[ $VERSION == *"-beta"* ]]; then
WINDOWS_VERSION=${VERSION%-beta}-1
else
WINDOWS_VERSION=$VERSION # Keep the same version for non-alpha/beta tags
fi
# Copy tauri.conf.json to tauri.windows.conf.json and substitute version number for Windows
cp src-tauri/tauri.conf.json src-tauri/tauri.windows.conf.json
# Use sed with an empty argument for in-place editing to ensure compatibility
sed -i '' "s/\"version\": \".*\"/\"version\": \"${WINDOWS_VERSION}\"/" src-tauri/tauri.windows.conf.json
- name: setup pnpm - name: setup pnpm
uses: pnpm/action-setup@v2 uses: pnpm/action-setup@v2
with: with:
@ -58,13 +81,13 @@ jobs:
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too. # If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
run: pnpm install # change this to npm or pnpm depending on which one you use. run: pnpm install # change this to npm or pnpm depending on which one you use.
- uses: tauri-apps/tauri-action@v0 - name: Create Release with Tauri Action
uses: tauri-apps/tauri-action@v0
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. tagName: "app-v${VERSION}" # Use the original version tag for the release
releaseName: 'App v__VERSION__' releaseName: "App v${VERSION}"
releaseBody: 'See the assets to download this version and install.' releaseBody: 'See the assets to download this version and install.'
releaseDraft: true releaseDraft: false # Set to true if you want the release to be a draft
prerelease: false prerelease: true
args: ${{ matrix.args }}