Skip to content

Commit

Permalink
fix github upload workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ShreyashKore committed Sep 5, 2024
1 parent e05a27b commit 07cd1c9
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ jobs:
run: |
JS_ZIP="com.shreyashkore.wonderouscompose_$VERSION-JS.zip"
WASM_ZIP="com.shreyashkore.wonderouscompose_$VERSION-WASM.zip"
(cd ./composeApp/build/dist && zip -r JS_ZIP js)
(cd ./composeApp/build/dist && zip -r WASM_ZIP wasmJs)
gh release upload $GITHUB_REF_NAME ./composeApp/build/dist/JS_ZIP
gh release upload $GITHUB_REF_NAME ./composeApp/build/dist/WASM_ZIP
gh release upload $GITHUB_REF_NAME ./composeApp/build/outputs/apk/release/composeApp-release.apk
gh release upload $GITHUB_REF_NAME ./composeApp/build/compose/binaries/main/deb/com.shreyashkore.wonderouscompose_$VERSION-1_amd64.deb
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
gh release upload $VERSION ./composeApp/build/dist/$WASM_ZIP
gh release upload $VERSION ./composeApp/build/outputs/apk/release/composeApp-release.apk
gh release upload "$VERSION" "$DEB_FILE"
- name: Deploy Wasm
if: ${{ github.event_name == 'release' }}
Expand All @@ -84,6 +85,15 @@ jobs:
runs-on: windows-latest

steps:
- name: print variables
env:
VERSION: ${{ toJson(github) }}
GITHUB_REF_NAME: ${{ github.ref_name }}
run: |
echo "VERRR $VERSION $GITHUB_REF_NAME"
echo "ref=${{ github.ref }}"
echo "value=${{ github.event.inputs.release_ref }}"
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v3
Expand All @@ -101,12 +111,13 @@ jobs:
run: |
./gradlew composeApp:packageMsi
- name: Upload Release Asset
if: ${{ github.event_name == 'release' }}
env:
VERSION: ${{ github.ref_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event_name == 'release' }}
run: |
gh release upload $GITHUB_REF_NAME ./composeApp/build/compose/binaries/main/msi/com.shreyashkore.wonderouscompose-$VERSION.msi
MSI_FILE=$(find ./composeApp/build/compose/binaries/main/msi/ -name "*.msi" | head -n 1)
gh release upload "$VERSION" "$MSI_FILE"
# build_ios:
# runs-on: macos-latest
Expand Down

0 comments on commit 07cd1c9

Please sign in to comment.