Skip to content

fix: update Node.js version to 20.19.0 in all workflows to resolve co… #6

fix: update Node.js version to 20.19.0 in all workflows to resolve co…

fix: update Node.js version to 20.19.0 in all workflows to resolve co… #6

Workflow file for this run

name: Release

Check failure on line 1 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

(Line: 9, Col: 3): The workflow must contain at least one job with no dependencies.
on:
push:
tags:
- 'v*'
jobs:
build-android:
runs-on: ubuntu-latest
needs: create-release
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.19.0'
cache: 'npm'
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Install dependencies
run: npm ci
- name: Build Android Release APK
run: |
cd android
./gradlew assembleRelease
cp app/build/outputs/apk/release/app-release.apk ../CardScanner-${{ github.ref_name }}-android.apk
- name: Upload Android Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: CardScanner-${{ github.ref_name }}-android.apk
asset_name: CardScanner-${{ github.ref_name }}-android.apk
asset_content_type: application/vnd.android.package-archive
build-ios:
runs-on: macos-latest
needs: create-release
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.19.0'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install iOS pods
run: |
cd ios
pod install
cd ..
- name: Build iOS Release
run: |
xcodebuild -workspace ios/CardScannerApp.xcworkspace \
-scheme CardScannerApp \
-configuration Release \
-sdk iphoneos \
-archivePath CardScannerApp.xcarchive \
archive
xcodebuild -exportArchive \
-archivePath CardScannerApp.xcarchive \
-exportOptionsPlist ios/ExportOptions.plist \
-exportPath build
cp build/CardScannerApp.ipa CardScanner-${{ github.ref_name }}-ios.ipa
- name: Upload iOS Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: CardScanner-${{ github.ref_name }}-ios.ipa
asset_name: CardScanner-${{ github.ref_name }}-ios.ipa
asset_content_type: application/octet-stream