diff --git a/.gitea/workflows/beta.yml b/.gitea/workflows/beta.yml index 64c6a52..cfe60c2 100644 --- a/.gitea/workflows/beta.yml +++ b/.gitea/workflows/beta.yml @@ -1,37 +1,24 @@ -name: Beta (TestFlight) +name: Beta (TestFlight, on PR to develop) on: - push: + pull_request: branches: - develop jobs: - wake-macos-vm: - runs-on: macos-ctl - steps: - - name: Start macOS VM container - run: docker start macos - build-and-upload: - needs: wake-macos-vm - runs-on: macos-release + runs-on: macos-build env: - APPLE_ID: ${{ secrets.APPLE_ID }} - ITC_TEAM_ID: ${{ secrets.ITC_TEAM_ID }} - DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }} - BUILD_NUMBER: ${{ gitea.run_number }} + BUILD_NUMBER: ${{ github.run_number }} steps: - - name: Checkout + - name: Checkout repository (workaround - Gitea git-upload-pack bug, see go-gitea/gitea#21819) run: | - export GIT_TERMINAL_PROMPT=0 - export GIT_ASKPASS=/bin/false - export SSH_ASKPASS=/bin/false - REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git" - AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")" - git -c credential.helper= -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=30 clone "$AUTH_URL" . - git checkout "${{ gitea.sha }}" + curl -sSfL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -o /tmp/repo.tar.gz \ + "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/archive/${{ github.sha }}.tar.gz" + tar -xzf /tmp/repo.tar.gz --strip-components=1 -C "$GITHUB_WORKSPACE" - name: Write App Store Connect API key run: | @@ -48,20 +35,11 @@ jobs: - name: Unlock keychain and run fastlane beta run: | - security unlock-keychain -p "${{ secrets.CI_KEYCHAIN_PASSWORD }}" ~/Library/Keychains/ci-signing.keychain-db - security list-keychains -d user -s ~/Library/Keychains/ci-signing.keychain-db ~/Library/Keychains/login.keychain-db - security default-keychain -d user -s ~/Library/Keychains/ci-signing.keychain-db + security unlock-keychain -p "${{ secrets.CI_KEYCHAIN_PASSWORD }}" ~/Library/Keychains/ci-build.keychain-db + security list-keychains -d user -s ~/Library/Keychains/ci-build.keychain-db ~/Library/Keychains/login.keychain-db security find-identity -v -p codesigning fastlane beta - name: Clean up API key if: always() run: rm -f fastlane/apikey.json - - sleep-macos-vm: - needs: build-and-upload - if: always() - runs-on: macos-ctl - steps: - - name: Stop macOS VM container - run: docker stop macos diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml deleted file mode 100644 index 99adb97..0000000 --- a/.gitea/workflows/release.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: Release (App Store Connect) - -on: - push: - branches: - - main - -jobs: - wake-macos-vm: - runs-on: macos-ctl - steps: - - name: Start macOS VM container - run: docker start macos - - build-archive-deliver: - needs: wake-macos-vm - runs-on: macos-release - - env: - APPLE_ID: ${{ secrets.APPLE_ID }} - ITC_TEAM_ID: ${{ secrets.ITC_TEAM_ID }} - DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }} - BUILD_NUMBER: ${{ gitea.run_number }} - - steps: - - name: Checkout - run: | - export GIT_TERMINAL_PROMPT=0 - export GIT_ASKPASS=/bin/false - export SSH_ASKPASS=/bin/false - REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git" - AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")" - git -c credential.helper= -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=30 clone "$AUTH_URL" . - git checkout "${{ gitea.sha }}" - - - name: Verify ASC secrets - run: | - if [ -z "${{ secrets.ASC_KEY_ID }}" ]; then - echo "ERROR: ASC_KEY_ID is empty" - exit 1 - fi - - - name: Write App Store Connect API key - run: | - cat > fastlane/apikey.json <