Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(task): update versions automatically #828

Merged
merged 7 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 60 additions & 48 deletions .github/workflows/build-release-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,63 @@ on:
- "*"

jobs:
build-android-release:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

- name: setup node
uses: actions/[email protected]
with:
node-version: lts/*

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: install dependencies (ubuntu only)
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

- name: install frontend dependencies
run: npm install

- name: Build Web Assets πŸ”¨
run: npm run build

- name: Set up JDK
uses: actions/[email protected]
with:
distribution: "temurin"
java-version: "21"

- name: Set up Android SDK
uses: android-actions/[email protected]

- name: Sync Capacitor Assets πŸ”¨
run: npx cap sync && npx cap copy android && cd android && ./gradlew assembleDebug

- name: Upload APK
uses: actions/[email protected]
with:
name: build-android
path: android/app/build/outputs/apk/debug/app-debug.apk
retention-days: 5

- name: Github Release Android
uses: softprops/action-gh-release@v2
with:
files: |
android/app/build/outputs/apk/debug/app-debug.apk
build-android-release:
runs-on: ubuntu-latest
env:
RELEASE_VERSION: ${{ github.ref_name }} # Set the release version from the tag

steps:
- uses: actions/[email protected]

- name: Setup Node
uses: actions/[email protected]
with:
node-version: lts/*

- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable

- name: Install Ubuntu Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

- name: Install Frontend Dependencies
run: npm install

- name: Update Download Links with New Version
run: node updateVersion.js

- name: Build Web Assets πŸ”¨
run: npm run build

- name: Set Up JDK
uses: actions/[email protected]
with:
distribution: "temurin"
java-version: "21"

- name: Set Up Android SDK
uses: android-actions/[email protected]

- name: Sync Capacitor Assets πŸ”¨
run: npx cap sync && npx cap copy android

- name: Build APK with Dynamic Version Name
run: |
cd android
./gradlew assembleDebug
mv app/build/outputs/apk/debug/app-debug.apk app/build/outputs/apk/debug/Uplink_${{ env.RELEASE_VERSION }}.apk

- name: Upload APK
uses: actions/[email protected]
with:
name: build-android
path: android/app/build/outputs/apk/debug/Uplink_${{ env.RELEASE_VERSION }}.apk
retention-days: 5

- name: GitHub Release Android
uses: softprops/action-gh-release@v2
with:
files: |
android/app/build/outputs/apk/debug/Uplink_${{ env.RELEASE_VERSION }}.apk
98 changes: 54 additions & 44 deletions .github/workflows/build-release-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,57 @@ on:
- "*"

jobs:
build-linux-release:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

- name: setup node
uses: actions/[email protected]
with:
node-version: lts/*

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: install dependencies (ubuntu only)
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

- name: install frontend dependencies
run: npm install

- uses: tauri-apps/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Calculate hashes
run: |
sha256sum src-tauri/target/release/bundle/deb/*.deb > src-tauri/target/release/bundle/deb/SHA256SUM

- name: Upload Ubuntu installer
uses: actions/[email protected]
with:
name: build-ubuntu
path: |
src-tauri/target/release/bundle/deb/*.deb
src-tauri/target/release/bundle/deb/SHA256SUM
retention-days: 5

- name: Github Release Linux
uses: softprops/action-gh-release@v2
with:
files: |
src-tauri/target/release/bundle/deb/*.deb
src-tauri/target/release/bundle/deb/SHA256SUM
build-linux-release:
runs-on: ubuntu-latest
env:
RELEASE_VERSION: ${{ github.ref_name }} # Set the release version from the tag

steps:
- uses: actions/[email protected]

- name: Setup Node
uses: actions/[email protected]
with:
node-version: lts/*

- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable

- name: Install Ubuntu Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

- name: Install Frontend Dependencies
run: npm install

- name: Build Tauri App
uses: tauri-apps/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Rename and Calculate Hashes for Release
run: |
# Rename the .deb file to include the release version
DEB_FILE=$(find src-tauri/target/release/bundle/deb -name "*.deb" | head -n 1)
NEW_DEB_FILE="src-tauri/target/release/bundle/deb/Uplink_${{ env.RELEASE_VERSION }}.deb"
mv "$DEB_FILE" "$NEW_DEB_FILE"

# Calculate SHA256 hash for the renamed .deb file
sha256sum "$NEW_DEB_FILE" > src-tauri/target/release/bundle/deb/SHA256SUM

- name: Upload Ubuntu Installer
uses: actions/[email protected]
with:
name: build-ubuntu
path: |
src-tauri/target/release/bundle/deb/Uplink_${{ env.RELEASE_VERSION }}.deb
src-tauri/target/release/bundle/deb/SHA256SUM
retention-days: 5

- name: GitHub Release Linux
uses: softprops/action-gh-release@v2
with:
files: |
src-tauri/target/release/bundle/deb/Uplink_${{ env.RELEASE_VERSION }}.deb
src-tauri/target/release/bundle/deb/SHA256SUM
89 changes: 50 additions & 39 deletions .github/workflows/build-release-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,53 @@ on:
- "*"

jobs:
build-macos-release:
permissions: write-all
runs-on: macos-latest
steps:
- uses: actions/[email protected]

- name: setup node
uses: actions/[email protected]
with:
node-version: lts/*

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: install frontend dependencies
run: npm install

- uses: tauri-apps/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.MACOS_CERTIFICATE_NAME }}
APPLE_ID: ${{ secrets.MACOS_NOTARIZATION_APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.MACOS_NOTARIZATION_PWD }}
APPLE_TEAM_ID: ${{ secrets.MACOS_NOTARIZATION_TEAM_ID }}

- name: Upload signed macOS Installer
uses: actions/[email protected]
with:
name: build-macos-official
path: src-tauri/target/release/bundle/dmg/*.dmg
retention-days: 5

- name: Github Release MacOS
uses: softprops/action-gh-release@v2
with:
files: |
src-tauri/target/release/bundle/dmg/*.dmg
build-macos-release:
permissions: write-all
runs-on: macos-latest
env:
RELEASE_VERSION: ${{ github.ref_name }} # Set the release version from the tag

steps:
- uses: actions/[email protected]

- name: Setup Node
uses: actions/[email protected]
with:
node-version: lts/*

- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable

- name: Install Frontend Dependencies
run: npm install

- name: Build Tauri App
uses: tauri-apps/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.MACOS_CERTIFICATE_NAME }}
APPLE_ID: ${{ secrets.MACOS_NOTARIZATION_APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.MACOS_NOTARIZATION_PWD }}
APPLE_TEAM_ID: ${{ secrets.MACOS_NOTARIZATION_TEAM_ID }}

- name: Rename and Prepare macOS DMG
run: |
# Find and rename the .dmg file to include the release version
DMG_FILE=$(find src-tauri/target/release/bundle/dmg -name "*.dmg" | head -n 1)
NEW_DMG_FILE="src-tauri/target/release/bundle/dmg/Uplink_${{ env.RELEASE_VERSION }}.dmg"
mv "$DMG_FILE" "$NEW_DMG_FILE"

- name: Upload signed macOS Installer
uses: actions/[email protected]
with:
name: build-macos-official
path: src-tauri/target/release/bundle/dmg/Uplink_${{ env.RELEASE_VERSION }}.dmg
retention-days: 5

- name: GitHub Release MacOS
uses: softprops/action-gh-release@v2
with:
files: |
src-tauri/target/release/bundle/dmg/Uplink_${{ env.RELEASE_VERSION }}.dmg
Loading