Remove FileManager_New.swift, replacing it with a complete rewrite us… #73
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| push: | |
| branches: [ main, experimental ] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: macos-14 | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: setup xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: show xcode version | |
| run: xcodebuild -version | |
| - name: build | |
| run: | | |
| xcodebuild \ | |
| -project lara.xcodeproj \ | |
| -scheme lara \ | |
| -configuration Debug \ | |
| -sdk iphoneos \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGN_IDENTITY="" \ | |
| archive \ | |
| -archivePath $PWD/build/lara.xcarchive | |
| APP_PATH="$PWD/build/lara.xcarchive/Products/Applications/lara.app" | |
| if [ ! -d "$APP_PATH" ]; then | |
| echo "Missing app at $APP_PATH" | |
| exit 1 | |
| fi | |
| rm -rf "$PWD/build/Payload" | |
| mkdir -p "$PWD/build/Payload" | |
| cp -R "$APP_PATH" "$PWD/build/Payload/" | |
| (cd "$PWD/build" && /usr/bin/zip -qry lara.ipa Payload) | |
| - name: create release tag | |
| id: tag | |
| run: | | |
| TAG="build_$(date +'%Y%m%d%H%M%S')-$(git rev-parse --short HEAD)" | |
| echo "TAG=$TAG" >> $GITHUB_ENV | |
| - name: get last 12h commits | |
| id: commits | |
| run: | | |
| COMMITS=$(git log --since="12 hours ago" --pretty=format:"- %h %s (%an)") | |
| # Use fallback text if no commits | |
| if [ -z "$COMMITS" ]; then | |
| COMMITS="No commits in the last 12 hours" | |
| fi | |
| echo "COMMITS<<EOF" >> $GITHUB_ENV | |
| echo "$COMMITS" >> $GITHUB_ENV | |
| echo "EOF" >> $GITHUB_ENV | |
| - name: delete old release | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const releases = await github.rest.repos.listReleases({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo | |
| }); | |
| const latestRelease = releases.data.find(r => r.tag_name === 'latest'); | |
| if (latestRelease) { | |
| await github.rest.repos.deleteRelease({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| release_id: latestRelease.id | |
| }); | |
| } | |
| - name: create new release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: latest | |
| name: Latest Build | |
| body: ${{ env.COMMITS }} | |
| files: build/lara.ipa | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |