mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-27 23:47:39 +01:00
ci: more fixes
This commit is contained in:
25
.github/workflows/alpha.yml
vendored
25
.github/workflows/alpha.yml
vendored
@@ -30,10 +30,10 @@ jobs:
|
|||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: 'SideStore/beta-build-num'
|
repository: "SideStore/beta-build-num"
|
||||||
ref: ${{ env.CHANNEL }}
|
ref: ${{ env.CHANNEL }}
|
||||||
token: ${{ secrets.CROSS_REPO_PUSH_KEY }}
|
token: ${{ secrets.CROSS_REPO_PUSH_KEY }}
|
||||||
path: 'Dependencies/beta-build-num'
|
path: "Dependencies/beta-build-num"
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Setup Env
|
- name: Setup Env
|
||||||
@@ -48,15 +48,16 @@ jobs:
|
|||||||
"${{ env.CHANNEL }}" \
|
"${{ env.CHANNEL }}" \
|
||||||
"$SHORT_COMMIT")
|
"$SHORT_COMMIT")
|
||||||
|
|
||||||
|
python3 scripts/ci/workflow.py set-marketing-version "$QUALIFIED_VERSION"
|
||||||
|
|
||||||
echo "BUILD_NUM=$BUILD_NUM" | tee -a $GITHUB_ENV
|
echo "BUILD_NUM=$BUILD_NUM" | tee -a $GITHUB_ENV
|
||||||
echo "MARKETING_VERSION=$MARKETING_VERSION" | tee -a $GITHUB_ENV
|
|
||||||
echo "SHORT_COMMIT=$SHORT_COMMIT" | tee -a $GITHUB_ENV
|
echo "SHORT_COMMIT=$SHORT_COMMIT" | tee -a $GITHUB_ENV
|
||||||
echo "VERSION=$QUALIFIED_VERSION" | tee -a $GITHUB_ENV
|
echo "MARKETING_VERSION=$QUALIFIED_VERSION" | tee -a $GITHUB_ENV
|
||||||
|
|
||||||
- name: Setup Xcode
|
- name: Setup Xcode
|
||||||
uses: maxim-lobanov/setup-xcode@v1.6.0
|
uses: maxim-lobanov/setup-xcode@v1.6.0
|
||||||
with:
|
with:
|
||||||
xcode-version: '26.2'
|
xcode-version: "26.2"
|
||||||
|
|
||||||
- name: Restore Cache (exact)
|
- name: Restore Cache (exact)
|
||||||
id: xcode-cache-exact
|
id: xcode-cache-exact
|
||||||
@@ -137,7 +138,7 @@ jobs:
|
|||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: encrypted-build-logs-${{ env.VERSION }}.zip
|
name: encrypted-build-logs-${{ env.MARKETING_VERSION }}.zip
|
||||||
path: encrypted-build-logs.zip
|
path: encrypted-build-logs.zip
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
@@ -154,19 +155,19 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: SideStore-${{ env.VERSION }}.ipa
|
name: SideStore-${{ env.MARKETING_VERSION }}.ipa
|
||||||
path: SideStore.ipa
|
path: SideStore.ipa
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: SideStore-${{ env.VERSION }}-dSYMs.zip
|
name: SideStore-${{ env.MARKETING_VERSION }}-dSYMs.zip
|
||||||
path: SideStore.dSYMs.zip
|
path: SideStore.dSYMs.zip
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: 'SideStore/apps-v2.json'
|
repository: "SideStore/apps-v2.json"
|
||||||
ref: 'main'
|
ref: "main"
|
||||||
token: ${{ secrets.CROSS_REPO_PUSH_KEY }}
|
token: ${{ secrets.CROSS_REPO_PUSH_KEY }}
|
||||||
path: 'SideStore/apps-v2.json'
|
path: "SideStore/apps-v2.json"
|
||||||
|
|
||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
# deploy
|
# deploy
|
||||||
@@ -189,7 +190,6 @@ jobs:
|
|||||||
"$CHANNEL" \
|
"$CHANNEL" \
|
||||||
"$SHORT_COMMIT" \
|
"$SHORT_COMMIT" \
|
||||||
"$MARKETING_VERSION" \
|
"$MARKETING_VERSION" \
|
||||||
"$VERSION" \
|
|
||||||
"$CHANNEL" \
|
"$CHANNEL" \
|
||||||
"$BUNDLE_ID" \
|
"$BUNDLE_ID" \
|
||||||
"$IPA_NAME" \
|
"$IPA_NAME" \
|
||||||
@@ -200,7 +200,6 @@ jobs:
|
|||||||
python3 scripts/ci/workflow.py upload-release \
|
python3 scripts/ci/workflow.py upload-release \
|
||||||
"$RELEASE_NAME" \
|
"$RELEASE_NAME" \
|
||||||
"$CHANNEL" \
|
"$CHANNEL" \
|
||||||
"$VERSION" \
|
|
||||||
"$GITHUB_SHA" \
|
"$GITHUB_SHA" \
|
||||||
"$GITHUB_REPOSITORY" \
|
"$GITHUB_REPOSITORY" \
|
||||||
"$UPSTREAM_CHANNEL"
|
"$UPSTREAM_CHANNEL"
|
||||||
29
.github/workflows/nightly.yml
vendored
29
.github/workflows/nightly.yml
vendored
@@ -4,7 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [develop]
|
branches: [develop]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: "0 0 * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
RELEASE_NAME: Nightly
|
RELEASE_NAME: Nightly
|
||||||
CHANNEL: nightly
|
CHANNEL: nightly
|
||||||
UPSTREAM_CHANNEL: ''
|
UPSTREAM_CHANNEL: ""
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -32,10 +32,10 @@ jobs:
|
|||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: 'SideStore/beta-build-num'
|
repository: "SideStore/beta-build-num"
|
||||||
ref: ${{ env.CHANNEL }}
|
ref: ${{ env.CHANNEL }}
|
||||||
token: ${{ secrets.CROSS_REPO_PUSH_KEY }}
|
token: ${{ secrets.CROSS_REPO_PUSH_KEY }}
|
||||||
path: 'Dependencies/beta-build-num'
|
path: "Dependencies/beta-build-num"
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Setup Env
|
- name: Setup Env
|
||||||
@@ -50,15 +50,16 @@ jobs:
|
|||||||
"${{ env.CHANNEL }}" \
|
"${{ env.CHANNEL }}" \
|
||||||
"$SHORT_COMMIT")
|
"$SHORT_COMMIT")
|
||||||
|
|
||||||
|
python3 scripts/ci/workflow.py set-marketing-version "$QUALIFIED_VERSION"
|
||||||
|
|
||||||
echo "BUILD_NUM=$BUILD_NUM" | tee -a $GITHUB_ENV
|
echo "BUILD_NUM=$BUILD_NUM" | tee -a $GITHUB_ENV
|
||||||
echo "MARKETING_VERSION=$MARKETING_VERSION" | tee -a $GITHUB_ENV
|
|
||||||
echo "SHORT_COMMIT=$SHORT_COMMIT" | tee -a $GITHUB_ENV
|
echo "SHORT_COMMIT=$SHORT_COMMIT" | tee -a $GITHUB_ENV
|
||||||
echo "VERSION=$QUALIFIED_VERSION" | tee -a $GITHUB_ENV
|
echo "MARKETING_VERSION=$QUALIFIED_VERSION" | tee -a $GITHUB_ENV
|
||||||
|
|
||||||
- name: Setup Xcode
|
- name: Setup Xcode
|
||||||
uses: maxim-lobanov/setup-xcode@v1.6.0
|
uses: maxim-lobanov/setup-xcode@v1.6.0
|
||||||
with:
|
with:
|
||||||
xcode-version: '26.2'
|
xcode-version: "26.2"
|
||||||
|
|
||||||
- name: Restore Cache (exact)
|
- name: Restore Cache (exact)
|
||||||
id: xcode-cache-exact
|
id: xcode-cache-exact
|
||||||
@@ -139,7 +140,7 @@ jobs:
|
|||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: encrypted-build-logs-${{ env.VERSION }}.zip
|
name: encrypted-build-logs-${{ env.MARKETING_VERSION }}.zip
|
||||||
path: encrypted-build-logs.zip
|
path: encrypted-build-logs.zip
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
@@ -156,19 +157,19 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: SideStore-${{ env.VERSION }}.ipa
|
name: SideStore-${{ env.MARKETING_VERSION }}.ipa
|
||||||
path: SideStore.ipa
|
path: SideStore.ipa
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: SideStore-${{ env.VERSION }}-dSYMs.zip
|
name: SideStore-${{ env.MARKETING_VERSION }}-dSYMs.zip
|
||||||
path: SideStore.dSYMs.zip
|
path: SideStore.dSYMs.zip
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: 'SideStore/apps-v2.json'
|
repository: "SideStore/apps-v2.json"
|
||||||
ref: 'main'
|
ref: "main"
|
||||||
token: ${{ secrets.CROSS_REPO_PUSH_KEY }}
|
token: ${{ secrets.CROSS_REPO_PUSH_KEY }}
|
||||||
path: 'SideStore/apps-v2.json'
|
path: "SideStore/apps-v2.json"
|
||||||
|
|
||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
# deploy
|
# deploy
|
||||||
@@ -191,7 +192,6 @@ jobs:
|
|||||||
"$CHANNEL" \
|
"$CHANNEL" \
|
||||||
"$SHORT_COMMIT" \
|
"$SHORT_COMMIT" \
|
||||||
"$MARKETING_VERSION" \
|
"$MARKETING_VERSION" \
|
||||||
"$VERSION" \
|
|
||||||
"$CHANNEL" \
|
"$CHANNEL" \
|
||||||
"$BUNDLE_ID" \
|
"$BUNDLE_ID" \
|
||||||
"$IPA_NAME" \
|
"$IPA_NAME" \
|
||||||
@@ -202,7 +202,6 @@ jobs:
|
|||||||
python3 scripts/ci/workflow.py upload-release \
|
python3 scripts/ci/workflow.py upload-release \
|
||||||
"$RELEASE_NAME" \
|
"$RELEASE_NAME" \
|
||||||
"$CHANNEL" \
|
"$CHANNEL" \
|
||||||
"$VERSION" \
|
|
||||||
"$GITHUB_SHA" \
|
"$GITHUB_SHA" \
|
||||||
"$GITHUB_REPOSITORY" \
|
"$GITHUB_REPOSITORY" \
|
||||||
"$UPSTREAM_CHANNEL"
|
"$UPSTREAM_CHANNEL"
|
||||||
@@ -68,7 +68,6 @@ def main():
|
|||||||
p.add_argument("--release-notes-dir", required=True)
|
p.add_argument("--release-notes-dir", required=True)
|
||||||
|
|
||||||
p.add_argument("--release-tag", required=True)
|
p.add_argument("--release-tag", required=True)
|
||||||
p.add_argument("--version", required=True)
|
|
||||||
p.add_argument("--marketing-version", required=True)
|
p.add_argument("--marketing-version", required=True)
|
||||||
p.add_argument("--short-commit", required=True)
|
p.add_argument("--short-commit", required=True)
|
||||||
p.add_argument("--release-channel", required=True)
|
p.add_argument("--release-channel", required=True)
|
||||||
@@ -143,7 +142,7 @@ def main():
|
|||||||
|
|
||||||
localized_description = textwrap.dedent(f"""
|
localized_description = textwrap.dedent(f"""
|
||||||
This is release for:
|
This is release for:
|
||||||
- version: "{args.version}"
|
- version: "{args.marketing_version}"
|
||||||
- revision: "{args.short_commit}"
|
- revision: "{args.short_commit}"
|
||||||
- timestamp: "{human}"
|
- timestamp: "{human}"
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ def get_bundle_id():
|
|||||||
)
|
)
|
||||||
|
|
||||||
def get_marketing_version():
|
def get_marketing_version():
|
||||||
return runAndGet("grep MARKETING_VERSION Build.xcconfig | sed -e 's/MARKETING_VERSION = //g'")
|
return runAndGet(f"grep MARKETING_VERSION {ROOT}/Build.xcconfig | sed -e 's/MARKETING_VERSION = //g'")
|
||||||
|
|
||||||
def set_marketing_version(qualified):
|
def set_marketing_version(qualified):
|
||||||
run(
|
run(
|
||||||
@@ -277,7 +277,7 @@ def retrieve_release_notes(tag):
|
|||||||
# DEPLOY SOURCE.JSON
|
# DEPLOY SOURCE.JSON
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
|
|
||||||
def deploy(repo, source_json, release_tag, short_commit, marketing_version, version, channel, bundle_id, ipa_name, last_successful_commit=None):
|
def deploy(repo, source_json, release_tag, short_commit, marketing_version, channel, bundle_id, ipa_name, last_successful_commit=None):
|
||||||
repo = (ROOT / repo).resolve()
|
repo = (ROOT / repo).resolve()
|
||||||
ipa_path = ROOT / ipa_name
|
ipa_path = ROOT / ipa_name
|
||||||
source_json_path = repo / source_json
|
source_json_path = repo / source_json
|
||||||
@@ -300,7 +300,6 @@ def deploy(repo, source_json, release_tag, short_commit, marketing_version, vers
|
|||||||
f"--output-name {metadata} "
|
f"--output-name {metadata} "
|
||||||
f"--release-notes-dir {ROOT} "
|
f"--release-notes-dir {ROOT} "
|
||||||
f"--release-tag {release_tag} "
|
f"--release-tag {release_tag} "
|
||||||
f"--version {version} "
|
|
||||||
f"--marketing-version {marketing_version} "
|
f"--marketing-version {marketing_version} "
|
||||||
f"--short-commit {short_commit} "
|
f"--short-commit {short_commit} "
|
||||||
f"--release-channel {channel} "
|
f"--release-channel {channel} "
|
||||||
@@ -331,7 +330,7 @@ def deploy(repo, source_json, release_tag, short_commit, marketing_version, vers
|
|||||||
# regenerate after reset so we don't lose changes
|
# regenerate after reset so we don't lose changes
|
||||||
run(f"python3 {SCRIPTS}/update_source_metadata.py '{ROOT}/{metadata}' '{source_json_path}'", cwd=repo)
|
run(f"python3 {SCRIPTS}/update_source_metadata.py '{ROOT}/{metadata}' '{source_json_path}'", cwd=repo)
|
||||||
run(f"git add --verbose {source_json}", cwd=repo)
|
run(f"git add --verbose {source_json}", cwd=repo)
|
||||||
run(f"git commit -m '{release_tag} - deployed {version}' || true", cwd=repo)
|
run(f"git commit -m '{release_tag} - deployed {marketing_version}' || true", cwd=repo)
|
||||||
|
|
||||||
rc = subprocess.call("git push", shell=True, cwd=repo)
|
rc = subprocess.call("git push", shell=True, cwd=repo)
|
||||||
|
|
||||||
@@ -365,7 +364,7 @@ def last_successful_commit(workflow, branch):
|
|||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def upload_release(release_name, release_tag, version, commit_sha, repo, upstream_recommendation):
|
def upload_release(release_name, release_tag, commit_sha, repo, upstream_recommendation):
|
||||||
token = getenv("GH_TOKEN")
|
token = getenv("GH_TOKEN")
|
||||||
if token:
|
if token:
|
||||||
os.environ["GH_TOKEN"] = token
|
os.environ["GH_TOKEN"] = token
|
||||||
@@ -377,6 +376,7 @@ def upload_release(release_name, release_tag, version, commit_sha, repo, upstrea
|
|||||||
|
|
||||||
meta = json.loads(metadata_path.read_text())
|
meta = json.loads(metadata_path.read_text())
|
||||||
|
|
||||||
|
marketing_version = bool(meta.get("version_ipa"))
|
||||||
is_beta = bool(meta.get("is_beta"))
|
is_beta = bool(meta.get("is_beta"))
|
||||||
build_datetime = meta.get("version_date")
|
build_datetime = meta.get("version_date")
|
||||||
|
|
||||||
@@ -406,7 +406,7 @@ def upload_release(release_name, release_tag, version, commit_sha, repo, upstrea
|
|||||||
Built at (UTC): `{built_time}`
|
Built at (UTC): `{built_time}`
|
||||||
Built at (UTC date): `{built_date}`
|
Built at (UTC date): `{built_date}`
|
||||||
Commit SHA: `{commit_sha}`
|
Commit SHA: `{commit_sha}`
|
||||||
Version: `{version}`
|
Version: `{marketing_version}`
|
||||||
"""
|
"""
|
||||||
|
|
||||||
header = inspect.cleandoc(raw_body)
|
header = inspect.cleandoc(raw_body)
|
||||||
@@ -483,9 +483,9 @@ COMMANDS = {
|
|||||||
"last-successful-commit" : (last_successful_commit, 2, "<workflow_name> <branch>"),
|
"last-successful-commit" : (last_successful_commit, 2, "<workflow_name> <branch>"),
|
||||||
"release-notes" : (release_notes, 1, "<tag>"),
|
"release-notes" : (release_notes, 1, "<tag>"),
|
||||||
"retrieve-release-notes" : (retrieve_release_notes, 1, "<tag>"),
|
"retrieve-release-notes" : (retrieve_release_notes, 1, "<tag>"),
|
||||||
"deploy" : (deploy, 10,
|
"deploy" : (deploy, 9,
|
||||||
"<repo> <source_json> <release_tag> <short_commit> <marketing_version> <version> <channel> <bundle_id> <ipa_name> [last_successful_commit]"),
|
"<repo> <source_json> <release_tag> <short_commit> <marketing_version> <channel> <bundle_id> <ipa_name> [last_successful_commit]"),
|
||||||
"upload-release" : (upload_release, 6, "<release_name> <release_tag> <version> <commit_sha> <repo> <upstream_recommendation>"),
|
"upload-release" : (upload_release, 5, "<release_name> <release_tag> <commit_sha> <repo> <upstream_recommendation>"),
|
||||||
}
|
}
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
Reference in New Issue
Block a user