-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(task): update versions automatically (#828)
- Loading branch information
1 parent
a48854a
commit 08ec632
Showing
8 changed files
with
283 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |
Oops, something went wrong.