Skip to content

Enable actions for all branches #98

Enable actions for all branches

Enable actions for all branches #98

Workflow file for this run

name: Build

Check failure on line 1 in .github/workflows/build.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yaml

Invalid workflow file

`pull` is not a valid event name
on:
workflow_call:
secrets:
KEYSTORE_FILE_BASE64:
KEYSTORE_KEY_ALIAS:
KEYSTORE_PASSWORD:
KEYSTORE_KEY_PASSWORD:
push:
pull:
jobs:
windows:
name: windows x86_64
runs-on: windows-latest
environment: windows
env:
build_package_name: veil-wallet win-x86_64
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@stable
- uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install dependencies
run: |
flutter config --no-analytics
flutter config --enable-windows-desktop
flutter pub get
- name: Build executable
run: flutter build windows --release
- uses: actions/upload-artifact@v3
with:
name: ${{ env.build_package_name }}
path: build/windows/x64/runner/Release/
linux:
name: linux x86_64
runs-on: ubuntu-latest
environment: linux
env:
build_package_name: veil-wallet linux-x86_64
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@stable
- uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install libsecret-1-dev clang pkg-config ninja-build libgtk-3-dev cmake
flutter config --no-analytics
flutter config --enable-linux-desktop
flutter pub get
- name: Build executable
run: flutter build linux --release
- uses: actions/upload-artifact@v3
with:
name: ${{ env.build_package_name }}
path: 'build/linux/x64/release/bundle/'
macos:
name: macos universal
runs-on: macos-latest
environment: macos
env:
build_package_name: veil-wallet macos-universal
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@stable
- uses: subosito/flutter-action@v2
with:
channel: stable
architecture: x64
cache: false
- name: Install dependencies
run: |
flutter config --no-analytics
flutter config --enable-macos-desktop
flutter pub cache clean
flutter pub get
- name: Build executable
run: |
flutter clean
flutter build macos
- uses: actions/upload-artifact@v3
with:
name: ${{ env.build_package_name }}
path: build/macos/Build/Products/Release/veil-wallet.app
ios:
name: ios
runs-on: macos-latest
environment: ios
env:
build_package_name: veil-wallet ios
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@stable
- uses: subosito/flutter-action@v2
with:
channel: stable
architecture: x64
- name: Install dependencies
run: |
brew install ldid
flutter config --no-analytics
flutter pub get
- name: Build executable
run: |
flutter build ios --release --no-codesign
cd ios
xcodebuild \
-workspace Runner.xcworkspace \
-scheme Runner \
-sdk iphoneos \
archive -archivePath Runner.xcarchive \
CODE_SIGNING_REQUIRED=NO \
AD_HOC_CODE_SIGNING_ALLOWED=YES \
CODE_SIGNING_ALLOWED=NO \
DEVELOPMENT_TEAM=XYZ0123456 \
ORG_IDENTIFIER=org.veilproject | xcpretty && exit ${PIPESTATUS[0]}
- name: Fakesign app
run: |
cd ios
rm -rf Runner.xcarchive/Products/Applications/Runner.app/Frameworks/*.framework/Frameworks/
ldid -SRunner/Runner.entitlements Runner.xcarchive/Products/Applications/Runner.app/Runner
- name: Build ipa
run: |
cd ios
mkdir Payload
mkdir Payload/Runner.app
cp -R Runner.xcarchive/Products/Applications/Runner.app/ Payload/Runner.app/
zip -r ../app-release.ipa Payload
- name: Cleanup
run: |
cd ios
rm -fr Runner.xcarchive
rm -fr Payload
- uses: actions/upload-artifact@v3
with:
name: ${{ env.build_package_name }}
path: app-release.ipa
android:
name: android
runs-on: ubuntu-latest
environment: android
env:
build_package_name: veil-wallet android
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '19'
- uses: dtolnay/rust-toolchain@stable
- uses: subosito/flutter-action@v2
with:
channel: stable
architecture: x64
- name: Install dependencies
run: |
flutter config --no-analytics
flutter pub get
- name: Check signing key
id: key-check
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_FILE_BASE64 }}
shell: bash
run: |
if [ "$KEYSTORE_BASE64" != '' ]; then
echo "available=true" >> $GITHUB_OUTPUT;
else
echo "available=false" >> $GITHUB_OUTPUT;
fi
- name: Retrieve base64 keystore and decode it to a file
if: ${{ steps.key-check.outputs.available == 'true' }}
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_FILE_BASE64 }}
run: echo $KEYSTORE_BASE64 | base64 --decode > '${{ github.workspace }}/android-keystore.jks'
- name: Create keystore.properties file
if: ${{ steps.key-check.outputs.available == 'true' }}
env:
KEYSTORE_PROPERTIES_PATH: ${{ github.workspace }}/android/key.properties
run: |
echo 'storeFile=${{ github.workspace }}/android-keystore.jks' > $KEYSTORE_PROPERTIES_PATH
echo 'keyAlias=${{ secrets.KEYSTORE_KEY_ALIAS }}' >> $KEYSTORE_PROPERTIES_PATH
echo 'storePassword=${{ secrets.KEYSTORE_PASSWORD }}' >> $KEYSTORE_PROPERTIES_PATH
echo 'keyPassword=${{ secrets.KEYSTORE_KEY_PASSWORD }}' >> $KEYSTORE_PROPERTIES_PATH
- name: Build executable
if: ${{ steps.key-check.outputs.available == 'true' }}
run: flutter build apk --release
- name: Build executable (debug)
if: ${{ steps.key-check.outputs.available != 'true' }}
run: flutter build apk --debug
- uses: actions/upload-artifact@v3
if: ${{ steps.key-check.outputs.available == 'true' }}
with:
name: ${{ env.build_package_name }}
path: build/app/outputs/flutter-apk/app-release.apk
- uses: actions/upload-artifact@v3
if: ${{ steps.key-check.outputs.available != 'true' }}
with:
name: ${{ env.build_package_name }}
path: build/app/outputs/flutter-apk/app-debug.apk