mastodon-ios/.github/workflows/develop-build.yml

75 lines
2.5 KiB
YAML
Raw Normal View History

2022-11-04 05:20:27 +01:00
name: Build for Develop TestFlight
on:
push:
branches:
- develop
- release*
2022-11-04 05:20:27 +01:00
- ci-test
jobs:
build:
name: Build
runs-on: macOS-12
steps:
2022-11-18 14:36:51 +01:00
- name: Checkout
2022-11-04 05:20:27 +01:00
uses: actions/checkout@v2
2022-11-18 14:36:51 +01:00
- name: Setup
2022-11-04 05:20:27 +01:00
env:
NotificationEndpointDebug: ${{ secrets.NotificationEndpointDebug }}
NotificationEndpointRelease: ${{ secrets.NotificationEndpointRelease }}
run: exec ./.github/scripts/setup.sh
2022-11-18 14:36:51 +01:00
- name: Install codemagic-cli-tools
uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: |
pip3 install codemagic-cli-tools
- run: |
codemagic-cli-tools --version || true
2022-11-04 05:20:27 +01:00
- name: Import Code-Signing Certificates
uses: Apple-Actions/import-codesign-certs@v1 # https://github.com/Apple-Actions/import-codesign-certs
with:
keychain: build-p12
p12-file-base64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
p12-password: ${{ secrets.P12_PASSWORD }}
- name: Download Provisioning Profiles
uses: Apple-Actions/download-provisioning-profiles@v1 # https://github.com/Apple-Actions/download-provisioning-profiles
with:
bundle-id: org.joinmastodon.app
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}
2022-11-18 14:36:51 +01:00
- name: Build
2022-11-04 05:20:27 +01:00
env:
ENV_APP_ID: ${{ secrets.APP_ID }}
2022-11-04 05:20:27 +01:00
ENV_ISSUER_ID: ${{ secrets.APPSTORE_ISSUER_ID }}
ENV_API_KEY_ID: ${{ secrets.APPSTORE_KEY_ID }}
ENV_API_PRIVATE_KEY: ${{ secrets.APPSTORE_PRIVATE_KEY }}
ENV_API_PRIVATE_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_KEY_BASE64 }}
2022-11-04 05:20:27 +01:00
run: exec ./.github/scripts/build-release.sh
- name: Upload TestFlight Build
uses: Apple-Actions/upload-testflight-build@master
with:
app-path: .build/Artifacts/Mastodon.ipa/Mastodon.ipa
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}
2022-11-18 14:36:51 +01:00
- name: Tag commit
uses: tvdias/github-tagger@v0.0.1
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
tag: "${{ env.GITHUB_TAG_NAME }}"
2022-11-04 05:20:27 +01:00
- name: Clean up keychain and provisioning profile
if: ${{ always() }}
run: |
security delete-keychain build-p12.keychain-db