Skip to content

Build Libruh release #9

Build Libruh release

Build Libruh release #9

Workflow file for this run

name: Libruh Auto-build
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
jobs:
buildIPA:
runs-on: macos-14
name: Build IPA test
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get branch name
run: |
# Short name for current branch. For PRs, use target branch (base ref)
GIT_BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}
echo "GIT_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Set up JDK 18
uses: actions/setup-java@v4
with:
java-version: 18
distribution: temurin
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '21'
cache: 'yarn'
#- name: Setup Yarn
# uses: threeal/[email protected]
- name: 'Create env file'
run: |
echo "${{ secrets.ENV_FILE }}" > .env
echo "APPSTORE=true" >> .env
echo "${{ secrets.SENTRY_PROPERTIES }}" > ./ios/sentry.properties
git submodule update --init --recursive
- name: alias yarn.cmd to yarn
run: alias yarn.cmd="yarn"
- name: Get Recent Commit Tag
id: get_commit_tag
run: |
COMMIT_TAG=$(git describe --tags --always --abbrev=0)
echo "COMMIT_TAG=${COMMIT_TAG}" >> $GITHUB_ENV
- name: Display Commit Tag
run: |
echo "Commit Tag: $COMMIT_TAG"
- name: Install dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 10
command: yarn install
- name: Pod Install
run: cd ios && rm Podfile.lock && pod install --repo-update
- name: Build
run: cd ios && xcodebuild -scheme libruh -workspace libruh.xcworkspace -configuration Release clean archive -archivePath "build/Libruh.xcarchive" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
- name: Archive to IPA
run: |
cd ios
mkdir build/Payload
mv build/Libruh.xcarchive/Products/Applications/Libruh.app build/Payload/Libruh.app
cd build
zip -r Libruh.ipa Payload/
#- name: Release IPA
# uses: softprops/action-gh-release@v2
# with:
# name: 'Release ${{env.COMMIT_TAG}}'
# tag_name: '${{env.COMMIT_TAG}}'
# files: ios/build/APM.ipa
# generate_release_notes: true
- uses: actions/upload-artifact@v4
with:
name: Libruh.ipa
path: ios/build/Libruh.ipa