Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use match to get code signing certificates #201

Merged
merged 81 commits into from
Apr 2, 2025
Merged

Conversation

magkue
Copy link
Contributor

@magkue magkue commented Oct 29, 2024

This PR adds the retrieval of the code signing certificate via Fastlane match.

Certs are stored encrypted in a gitlab repository and managed automatically by Fastlane. The cert is shared by multiple build agents across multiple platforms. For this to be used with GitHub actions a workflow needs to be configured. The necessary environment vars (all prefixed with IOS_) are set as organization secrets. The workflow additionally should export a, for all workflows unique, BUILD_NUMBER. A example workflow for building and releasing from gitlab is linked in this PR.

I also added a new self-hosted runner that needs to be used for the workflow called ls1Agent-mac-2.ase.cit.tum.de with the label "macOS".

Workflow example from GitLab:

stages:
  - Build 🛠️
  - Release 🚀

variables:
  LANG: "en_US.UTF-8"
  LANGUAGE: "en_US.UTF-8"
  LC_ALL: "en_US.UTF-8"

build:
  stage: Build 🛠️
  script:
    - bundle update
    - bundle exec fastlane build
  artifacts:
    expire_in: 1 week
    paths:
      - ./build/*/*.ipa
      - ./build/*/*.dSYM.zip
  tags:
    - macos

release:
  stage: Release 🚀
  script:
    - bundle exec fastlane release
  when: manual # Run the release only after manual action
  needs:
    - build
  tags:
    - macos
  only:
    - main
    - develop

@magkue magkue self-assigned this Oct 29, 2024
Copy link
Member

@anian03 anian03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing it, this is great :D

No major objections from my side. Technically we can leave out the testing part as we currently don't have any tests, but for the future it makes sense to already have it. Do you have any objections against merging it like this, e.g. testing the TestFlight upload beforehand? The screenshots action we can do in a separate PR

@magkue
Copy link
Contributor Author

magkue commented Apr 2, 2025

From my side this is fine, yes the screenshots can be a separate PR. Should I merge it or do you want to do it. I would definitely squash it before the merge, as I did quite some messy commits in between.

@anian03
Copy link
Member

anian03 commented Apr 2, 2025

Thanks! I will merge it and definitely squash :)

@anian03 anian03 merged commit e05368a into develop Apr 2, 2025
1 of 2 checks passed
@anian03 anian03 deleted the ci/fastlane-using-match branch April 2, 2025 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants