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:
27
.github/workflows/alpha.yml
vendored
27
.github/workflows/alpha.yml
vendored
@@ -30,10 +30,10 @@ jobs:
|
||||
# --------------------------------------------------
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'SideStore/beta-build-num'
|
||||
repository: "SideStore/beta-build-num"
|
||||
ref: ${{ env.CHANNEL }}
|
||||
token: ${{ secrets.CROSS_REPO_PUSH_KEY }}
|
||||
path: 'Dependencies/beta-build-num'
|
||||
path: "Dependencies/beta-build-num"
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Setup Env
|
||||
@@ -48,15 +48,16 @@ jobs:
|
||||
"${{ env.CHANNEL }}" \
|
||||
"$SHORT_COMMIT")
|
||||
|
||||
python3 scripts/ci/workflow.py set-marketing-version "$QUALIFIED_VERSION"
|
||||
|
||||
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 "VERSION=$QUALIFIED_VERSION" | tee -a $GITHUB_ENV
|
||||
echo "MARKETING_VERSION=$QUALIFIED_VERSION" | tee -a $GITHUB_ENV
|
||||
|
||||
- name: Setup Xcode
|
||||
uses: maxim-lobanov/setup-xcode@v1.6.0
|
||||
with:
|
||||
xcode-version: '26.2'
|
||||
xcode-version: "26.2"
|
||||
|
||||
- name: Restore Cache (exact)
|
||||
id: xcode-cache-exact
|
||||
@@ -77,7 +78,7 @@ jobs:
|
||||
~/Library/Caches/org.swift.swiftpm
|
||||
key: xcode-build-cache-${{ github.ref_name }}-
|
||||
|
||||
# --------------------------------------------------
|
||||
# --------------------------------------------------
|
||||
# build and test
|
||||
# --------------------------------------------------
|
||||
- name: Clean
|
||||
@@ -137,7 +138,7 @@ jobs:
|
||||
# --------------------------------------------------
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: encrypted-build-logs-${{ env.VERSION }}.zip
|
||||
name: encrypted-build-logs-${{ env.MARKETING_VERSION }}.zip
|
||||
path: encrypted-build-logs.zip
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
@@ -154,19 +155,19 @@ jobs:
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: SideStore-${{ env.VERSION }}.ipa
|
||||
name: SideStore-${{ env.MARKETING_VERSION }}.ipa
|
||||
path: SideStore.ipa
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: SideStore-${{ env.VERSION }}-dSYMs.zip
|
||||
name: SideStore-${{ env.MARKETING_VERSION }}-dSYMs.zip
|
||||
path: SideStore.dSYMs.zip
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'SideStore/apps-v2.json'
|
||||
ref: 'main'
|
||||
repository: "SideStore/apps-v2.json"
|
||||
ref: "main"
|
||||
token: ${{ secrets.CROSS_REPO_PUSH_KEY }}
|
||||
path: 'SideStore/apps-v2.json'
|
||||
path: "SideStore/apps-v2.json"
|
||||
|
||||
# --------------------------------------------------
|
||||
# deploy
|
||||
@@ -189,7 +190,6 @@ jobs:
|
||||
"$CHANNEL" \
|
||||
"$SHORT_COMMIT" \
|
||||
"$MARKETING_VERSION" \
|
||||
"$VERSION" \
|
||||
"$CHANNEL" \
|
||||
"$BUNDLE_ID" \
|
||||
"$IPA_NAME" \
|
||||
@@ -200,7 +200,6 @@ jobs:
|
||||
python3 scripts/ci/workflow.py upload-release \
|
||||
"$RELEASE_NAME" \
|
||||
"$CHANNEL" \
|
||||
"$VERSION" \
|
||||
"$GITHUB_SHA" \
|
||||
"$GITHUB_REPOSITORY" \
|
||||
"$UPSTREAM_CHANNEL"
|
||||
31
.github/workflows/nightly.yml
vendored
31
.github/workflows/nightly.yml
vendored
@@ -4,7 +4,7 @@ on:
|
||||
push:
|
||||
branches: [develop]
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
- cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
env:
|
||||
RELEASE_NAME: Nightly
|
||||
CHANNEL: nightly
|
||||
UPSTREAM_CHANNEL: ''
|
||||
UPSTREAM_CHANNEL: ""
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -32,10 +32,10 @@ jobs:
|
||||
# --------------------------------------------------
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'SideStore/beta-build-num'
|
||||
repository: "SideStore/beta-build-num"
|
||||
ref: ${{ env.CHANNEL }}
|
||||
token: ${{ secrets.CROSS_REPO_PUSH_KEY }}
|
||||
path: 'Dependencies/beta-build-num'
|
||||
path: "Dependencies/beta-build-num"
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Setup Env
|
||||
@@ -50,15 +50,16 @@ jobs:
|
||||
"${{ env.CHANNEL }}" \
|
||||
"$SHORT_COMMIT")
|
||||
|
||||
python3 scripts/ci/workflow.py set-marketing-version "$QUALIFIED_VERSION"
|
||||
|
||||
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 "VERSION=$QUALIFIED_VERSION" | tee -a $GITHUB_ENV
|
||||
echo "MARKETING_VERSION=$QUALIFIED_VERSION" | tee -a $GITHUB_ENV
|
||||
|
||||
- name: Setup Xcode
|
||||
uses: maxim-lobanov/setup-xcode@v1.6.0
|
||||
with:
|
||||
xcode-version: '26.2'
|
||||
xcode-version: "26.2"
|
||||
|
||||
- name: Restore Cache (exact)
|
||||
id: xcode-cache-exact
|
||||
@@ -79,7 +80,7 @@ jobs:
|
||||
~/Library/Caches/org.swift.swiftpm
|
||||
key: xcode-build-cache-${{ github.ref_name }}-
|
||||
|
||||
# --------------------------------------------------
|
||||
# --------------------------------------------------
|
||||
# build and test
|
||||
# --------------------------------------------------
|
||||
- name: Clean
|
||||
@@ -139,7 +140,7 @@ jobs:
|
||||
# --------------------------------------------------
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: encrypted-build-logs-${{ env.VERSION }}.zip
|
||||
name: encrypted-build-logs-${{ env.MARKETING_VERSION }}.zip
|
||||
path: encrypted-build-logs.zip
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
@@ -156,19 +157,19 @@ jobs:
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: SideStore-${{ env.VERSION }}.ipa
|
||||
name: SideStore-${{ env.MARKETING_VERSION }}.ipa
|
||||
path: SideStore.ipa
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: SideStore-${{ env.VERSION }}-dSYMs.zip
|
||||
name: SideStore-${{ env.MARKETING_VERSION }}-dSYMs.zip
|
||||
path: SideStore.dSYMs.zip
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'SideStore/apps-v2.json'
|
||||
ref: 'main'
|
||||
repository: "SideStore/apps-v2.json"
|
||||
ref: "main"
|
||||
token: ${{ secrets.CROSS_REPO_PUSH_KEY }}
|
||||
path: 'SideStore/apps-v2.json'
|
||||
path: "SideStore/apps-v2.json"
|
||||
|
||||
# --------------------------------------------------
|
||||
# deploy
|
||||
@@ -191,7 +192,6 @@ jobs:
|
||||
"$CHANNEL" \
|
||||
"$SHORT_COMMIT" \
|
||||
"$MARKETING_VERSION" \
|
||||
"$VERSION" \
|
||||
"$CHANNEL" \
|
||||
"$BUNDLE_ID" \
|
||||
"$IPA_NAME" \
|
||||
@@ -202,7 +202,6 @@ jobs:
|
||||
python3 scripts/ci/workflow.py upload-release \
|
||||
"$RELEASE_NAME" \
|
||||
"$CHANNEL" \
|
||||
"$VERSION" \
|
||||
"$GITHUB_SHA" \
|
||||
"$GITHUB_REPOSITORY" \
|
||||
"$UPSTREAM_CHANNEL"
|
||||
@@ -68,7 +68,6 @@ def main():
|
||||
p.add_argument("--release-notes-dir", 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("--short-commit", required=True)
|
||||
p.add_argument("--release-channel", required=True)
|
||||
@@ -143,7 +142,7 @@ def main():
|
||||
|
||||
localized_description = textwrap.dedent(f"""
|
||||
This is release for:
|
||||
- version: "{args.version}"
|
||||
- version: "{args.marketing_version}"
|
||||
- revision: "{args.short_commit}"
|
||||
- timestamp: "{human}"
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ def get_bundle_id():
|
||||
)
|
||||
|
||||
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):
|
||||
run(
|
||||
@@ -277,7 +277,7 @@ def retrieve_release_notes(tag):
|
||||
# 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()
|
||||
ipa_path = ROOT / ipa_name
|
||||
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"--release-notes-dir {ROOT} "
|
||||
f"--release-tag {release_tag} "
|
||||
f"--version {version} "
|
||||
f"--marketing-version {marketing_version} "
|
||||
f"--short-commit {short_commit} "
|
||||
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
|
||||
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 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)
|
||||
|
||||
@@ -365,7 +364,7 @@ def last_successful_commit(workflow, branch):
|
||||
|
||||
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")
|
||||
if 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())
|
||||
|
||||
marketing_version = bool(meta.get("version_ipa"))
|
||||
is_beta = bool(meta.get("is_beta"))
|
||||
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 date): `{built_date}`
|
||||
Commit SHA: `{commit_sha}`
|
||||
Version: `{version}`
|
||||
Version: `{marketing_version}`
|
||||
"""
|
||||
|
||||
header = inspect.cleandoc(raw_body)
|
||||
@@ -483,9 +483,9 @@ COMMANDS = {
|
||||
"last-successful-commit" : (last_successful_commit, 2, "<workflow_name> <branch>"),
|
||||
"release-notes" : (release_notes, 1, "<tag>"),
|
||||
"retrieve-release-notes" : (retrieve_release_notes, 1, "<tag>"),
|
||||
"deploy" : (deploy, 10,
|
||||
"<repo> <source_json> <release_tag> <short_commit> <marketing_version> <version> <channel> <bundle_id> <ipa_name> [last_successful_commit]"),
|
||||
"upload-release" : (upload_release, 6, "<release_name> <release_tag> <version> <commit_sha> <repo> <upstream_recommendation>"),
|
||||
"deploy" : (deploy, 9,
|
||||
"<repo> <source_json> <release_tag> <short_commit> <marketing_version> <channel> <bundle_id> <ipa_name> [last_successful_commit]"),
|
||||
"upload-release" : (upload_release, 5, "<release_name> <release_tag> <commit_sha> <repo> <upstream_recommendation>"),
|
||||
}
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user