Skip to content

tempp

tempp #84

Workflow file for this run

name: Main
on:
release:
types: [ published, prereleased ]
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
# build_android_linux_web:
# permissions:
# contents: write
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v4
# - name: set up JDK 17
# uses: actions/setup-java@v3
# with:
# java-version: '17'
# distribution: 'temurin'
# cache: gradle
#
# - name: Grant execute permission for gradlew
# run: chmod +x gradlew
# - name: Create Key.properties File
# run: |
# echo "storePassword=${{ secrets.STORE_PASSWORD }}" > ./key.properties
# echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> ./key.properties
# echo "alias=${{ secrets.KEY_ALIAS }}" >> ./key.properties
# echo "path=${{ runner.temp }}/key.jks" >> ./key.properties
# - name: Create Local.properties File
# run: |
# echo "MAPS_API_KEY=${{ secrets.MAP_API_KEY }}" >> ./local.properties
# - name: Create Android keystore File
# run: |
# echo -n "${{ secrets.ANDROID_KEYSTORE }}" | base64 -d > $RUNNER_TEMP/key.jks
# - name: Build APK
# run: ./gradlew composeApp:assembleRelease
# - name: Build Deb
# run: ./gradlew composeApp:packageDeb
# - name: Build WASM
# run: ./gradlew composeApp:wasmJsBrowserDistribution
# - name: Build JS
# run: ./gradlew composeApp:jsBrowserDistribution
# - name: Upload Release Asset
# if: ${{ github.event_name == 'release' }}
# env:
# VERSION: ${{ github.ref_name }}
# GITHUB_TOKEN: ${{ secrets.TOKEN }}
# run: |
# JS_ZIP="com.shreyashkore.wonderouscompose_$VERSION-JS.zip"
# WASM_ZIP="com.shreyashkore.wonderouscompose_$VERSION-WASM.zip"
# DEB_FILE=$(find ./composeApp/build/compose/binaries/main/deb/ -name "*.deb" | head -n 1)
# (cd ./composeApp/build/dist && zip -r $JS_ZIP js)
# (cd ./composeApp/build/dist && zip -r $WASM_ZIP wasmJs)
# gh release upload "$VERSION" "./composeApp/build/dist/$JS_ZIP" --clobber
# gh release upload "$VERSION" "./composeApp/build/dist/$WASM_ZIP" --clobber
# gh release upload "$VERSION" "./composeApp/build/outputs/apk/release/composeApp-release.apk" --clobber
# gh release upload "$VERSION" "$DEB_FILE" --clobber
#
# - name: Deploy Wasm
# if: ${{ github.event_name == 'release' }}
# uses: JamesIves/[email protected]
# with:
# token: ${{ secrets.TOKEN }}
# branch: main
# folder: composeApp/build/dist/wasmJs/productionExecutable
# repository-name: ShreyashKore/wonderous-compose-wasm
# - name: Deploy JS
# if: ${{ github.event_name == 'release' }}
# uses: JamesIves/[email protected]
# with:
# token: ${{ secrets.TOKEN }}
# branch: main
# folder: composeApp/build/dist/js/productionExecutable
# repository-name: ShreyashKore/wonderous-compose-js
build_windows:
permissions:
contents: write
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: |
chmod +x gradlew
- name: Create dummy local.properties
run: echo "sdk.dir=some_location" > ./local.properties
- name: Build MSI
run: |
./gradlew composeApp:packageMsi
- name: Upload Release Asset
# if: ${{ github.event_name == 'release' }}
env:
VERSION: ${{ github.ref_name }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
run: |
$MSI_FILE = Get-ChildItem -Path .\composeApp\build\compose\binaries\main\msi\ -Filter *.msi | Select-Object -First 1
gh release upload $VERSION ".\composeApp\build\compose\binaries\main\msi\com.shreyashkore.wonderouscompose-1.0.4.msi" --clobber
# build_ios:
# runs-on: macos-latest
#
# steps:
# - uses: actions/checkout@v4
# - name: set up JDK 17
# uses: actions/setup-java@v3
# with:
# java-version: '17'
# distribution: 'temurin'
# cache: gradle
#
# - name: Grant execute permission for gradlew
# run: chmod +x gradlew
# - name: "Setup Gradle"
# uses: gradle/gradle-build-action@v2
# - name: "Build xcworkspace"
# run: ./gradlew podInstall