Skip to content

Release v1.99.1

Release v1.99.1 #122

Workflow file for this run

name: 'Release'
run-name: "${{ github.event_name == 'release' && format('Release {0}', github.ref_name) || format('Snapshot {0}', github.sha) }}"
on:
release:
types: [ published ]
workflow_dispatch:
env:
TAURI_BUILD_FLAGS: "${{ github.event_name == 'release' && ' ' || '-d' }}"
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: webosbrew
SENTRY_PROJECT: dev-manager-desktop-ui
SENTRY_ENVIRONMENT: "${{ github.event_name == 'release' && 'release' || 'development' }}"
ANDROID_NDK_VERSION: '26.3.11579264'
jobs:
sentry-create-release:
name: Create Sentry Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Extract Version
id: pkg-version
uses: Saionaro/[email protected]
- name: Generate Sentry Release Name
id: release-info
uses: actions/github-script@v7
with:
script: |
if (process.env.SENTRY_ENVIRONMENT !== 'release') {
return "${{ steps.pkg-version.outputs.version }}-" + context.sha.substring(0, 7);
} else {
return "${{ steps.pkg-version.outputs.version }}";
}
result-encoding: string
- uses: getsentry/action-release@v1
name: Create Sentry Release
with:
version: ${{ steps.release-info.outputs.result }}
ignore_missing: true
ignore_empty: true
finalize: false
outputs:
release: ${{ steps.release-info.outputs.result }}
build:
name: Build Package
strategy:
fail-fast: false
matrix:
include:
- target: windows
os: windows-latest
- target: linux-x86_64
os: ubuntu-22.04
- target: linux-arm64
os: debian-arm64-latest
- target: macos
os: macos-latest
- target: android
os: ubuntu-22.04
runs-on: ${{ matrix.os }}
needs: sentry-create-release
steps:
- uses: actions/checkout@v4
- name: Install Required Packages (Linux)
if: startsWith(matrix.target, 'linux')
run: |
sudo apt-get update
sudo apt-get install -y build-essential curl wget file libssl-dev libayatana-appindicator3-dev \
libwebkit2gtk-4.1-dev librsvg2-dev
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup JDK
uses: actions/setup-java@v4
if: startsWith(matrix.target, 'android')
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
if: startsWith(matrix.target, 'android')
uses: android-actions/setup-android@v3
with:
packages: "build-tools;34.0.0 ndk;${{ env.ANDROID_NDK_VERSION }} platforms;android-33"
- name: Add NDK to PATH
if: startsWith(matrix.target, 'android')
shell: bash
run: |
echo ${NDK_HOME}/toolchains/llvm/prebuilt/*/bin >> $GITHUB_PATH
env:
NDK_HOME: "${{ env.ANDROID_HOME }}/ndk/${{ env.ANDROID_NDK_VERSION }}"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
- name: Write Version
uses: actions/github-script@v6
with:
script: |
const release = "${{ needs.sentry-create-release.outputs.release }}".trim();
if (!release) {
core.setFailed('Sentry release was not found');
return;
}
const fs = require('fs');
fs.writeFileSync('src/release.json', JSON.stringify({
version: release
}));
- name: Install NPM Dependencies
run: npm ci
- name: Build the app (Windows)
if: startsWith(matrix.target, 'windows')
run: |
rustup target add i686-pc-windows-msvc
npm run build -- --features=vendored-openssl --target x86_64-pc-windows-msvc ${{ env.TAURI_BUILD_FLAGS }}
npm run build -- --features=vendored-openssl --target i686-pc-windows-msvc ${{ env.TAURI_BUILD_FLAGS }}
- name: Build the app (Linux)
if: startsWith(matrix.target, 'linux')
run: npm run build -- --features=vendored-openssl ${{ env.TAURI_BUILD_FLAGS }}
- name: Build the app (macOS)
if: startsWith(matrix.target, 'macos')
run: |
# Blocked by https://github.com/webosbrew/dev-manager-desktop/issues/116
# rustup target add aarch64-apple-darwin
# npm run build -- --features=vendored-openssl --target universal-apple-darwin ${{ env.TAURI_BUILD_FLAGS }}
npm run build -- --features=vendored-openssl ${{ env.TAURI_BUILD_FLAGS }}
- name: Build the app (Android)
if: startsWith(matrix.target, 'android')
shell: bash
run: |
npm run tauri android init
npm run tauri android build -- --aab
env:
NDK_HOME: "${{ env.ANDROID_HOME }}/ndk/${{ env.ANDROID_NDK_VERSION }}"
- name: Upload Source Maps
run: npx --yes @sentry/cli sourcemaps upload -r ${{ needs.sentry-create-release.outputs.release }} dist
- name: Upload Android Bundle
uses: actions/upload-artifact@v4
if: startsWith(matrix.target, 'android')
with:
name: android-bundle
path: |
src-tauri/gen/android/app/build/outputs/bundle/universalRelease/*.aab
- name: Upload Artifact
uses: actions/upload-artifact@v4
if: ${{ !startsWith(matrix.target, 'android') && github.event_name != 'release' }}
with:
name: ${{ matrix.target }}-snapshot
path: |
target/**/bundle/deb/*.deb
target/**/bundle/appimage/*.AppImage
target/**/bundle/msi/*.msi
target/**/bundle/dmg/*.dmg
- name: Create Release
uses: ncipollo/release-action@v1
if: ${{ !startsWith(matrix.target, 'android') && github.event_name == 'release' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Dev Manager ${{ github.ref_name }}
allowUpdates: true
omitNameDuringUpdate: true
omitBodyDuringUpdate: true
omitPrereleaseDuringUpdate: true
artifacts: "target/**/bundle/deb/*.deb,\
target/**/bundle/appimage/*.AppImage,\
target/**/bundle/msi/*.msi,\
target/**/bundle/dmg/*.dmg"
sentry-finalize-release:
name: Finalize Sentry Release
runs-on: ubuntu-latest
needs: [ sentry-create-release, build ]
steps:
- uses: actions/checkout@v4
- uses: getsentry/action-release@v1
with:
version: ${{ needs.sentry-create-release.outputs.release }}
ignore_missing: true
ignore_empty: true
finalize: false