Add dynamic team id

This commit is contained in:
Balazs Perlaki-Horvath 2025-02-01 17:55:03 +01:00
parent a5551d68c5
commit 84215f04da
3 changed files with 8 additions and 3 deletions

View File

@ -83,7 +83,7 @@ jobs:
ls -la
- name: Set up scheme, version, build_number from files
- name: Set up scheme, version, build_number, and team-id from files
run: |
# move the checked out github actions to root folder:
mv apple/.github/ .
@ -94,6 +94,9 @@ jobs:
VERSION=$(<./apple/custom/.version_number)
echo "VERSION=$VERSION" >> $GITHUB_ENV
TEAM_ID=$(<./apple/custom/.team_id)
echo "TEAM_ID=$TEAM_ID" >> $GITHUB_ENV
# taken from: kiwix/kiwix-apple .github/workflows/cd.yml
- name: Set up variables for build
env:
@ -159,14 +162,14 @@ jobs:
env:
APPLE_SIGNING_ALTOOL_USERNAME: ${{ secrets.APPLE_SIGNING_ALTOOL_USERNAME }}
APPLE_SIGNING_ALTOOL_PASSWORD: ${{ secrets.APPLE_SIGNING_ALTOOL_PASSWORD }}
APPLE_SIGNING_TEAM: ${{ secrets.APPLE_SIGNING_TEAM }}
TEAM_ID: ${{ env.TEAM_ID }}
run: |
security find-identity -v $KEYCHAIN
security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN
xcrun notarytool store-credentials \
--apple-id "${APPLE_SIGNING_ALTOOL_USERNAME}" \
--password "${APPLE_SIGNING_ALTOOL_PASSWORD}" \
--team-id "${APPLE_SIGNING_TEAM}" \
--team-id "${TEAM_ID}" \
--validate \
--keychain $KEYCHAIN \
$KEYCHAIN_PROFILE

View File

@ -42,6 +42,7 @@ class InfoParser:
self.data[JSON_KEY_ZIM_URL])
self.version = Version.from_file_name(file_name=self.zim_file_name,
build_number=build_number)
self.development_team_id = self._development_team()
def create_plist(self, based_on_plist_file):
with based_on_plist_file.open(mode="rb") as file:

View File

@ -43,6 +43,7 @@ def _is_valid(tag):
Path('.brand_name').write_text(f"{brand.name}")
Path('.build_number').write_text(f"{version.build_number}")
Path('.version_number').write_text(f"{version.semantic}")
Path('.team_id').write_text(f"{parser.development_team_id}")
# required as an output, we can pipe on:
print(f"{brand.name} {version.build_number}")