Files
IronFox/scripts/ci-publish-packages.sh
celenity 870c6342f3 IronFox v146.0.1
ironfox-oss/IronFox!112
____

## Changes

- [Enabled memory tagging](e24a24e63c) *(via [Android's Arm Memory Tagging Extension](https://developer.android.com/ndk/guides/arm-mte))* to improve security for supported devices *(such as the Pixel 8 and newer)*.
- [Fixed an issue with Obtainium app installation](6026d6524f).
- Updated Bundletool to [`1.18.3`](https://github.com/google/bundletool/releases/tag/1.18.3).
- Updated to Firefox [`146.0.1`](https://firefox.com/firefox/android/146.0.1/releasenotes/).
- Updated microG to [`v0.3.11.250932`](https://github.com/microg/GmsCore/releases/tag/v0.3.11.250932).
- Updated Rust to [`1.92.0`](https://releases.rs/docs/1.92.0/).
- [Various tweaks, fixes, and refinements - especially to the build process](https://gitlab.com/ironfox-oss/IronFox/-/merge_requests/112/diffs).

MR-author: celenity <celenity@celenity.dev>
Co-authored-by: Weblate <hosted@weblate.org>
Co-authored-by: Akash Yadav <itsaky01@gmail.com>
Co-authored-by: techaddict <20232669-techaddict@users.noreply.gitlab.com>
Co-authored-by: user <user@localhost.localdomain>
Approved-by: Akash Yadav <itsaky01@gmail.com>
Merged-by: celenity <celenity@celenity.dev>
2025-12-19 16:16:28 +00:00

86 lines
2.4 KiB
Bash
Executable File

#!/bin/bash
# This file is expected to be executed in GitLab CI
# DO NOT executed this manually!
set -eu
source "$(realpath $(dirname "$0"))/versions.sh"
export GENERIC_PACKAGES_URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic"
upload_to_package_registry() {
local file="$1"
local package_name="$2"
local file_name="$(basename "$file")"
curl --header "PRIVATE-TOKEN: $GITLAB_CI_API_TOKEN" \
--upload-file "$file" \
"$GENERIC_PACKAGES_URL/${package_name}/${IRONFOX_VERSION}/${file_name}"
}
export ARTIFACTS=$CI_PROJECT_DIR/artifacts
export APK_ARTIFACTS=$ARTIFACTS/apk
export APKS_ARTIFACTS=$ARTIFACTS/apks
export BUILD_DIR="$CI_PROJECT_DIR/build"
mkdir -vp "$BUILD_DIR"
RELEASE_NOTES_FILE="$BUILD_DIR/release-notes.md"
CHECKSUMS_FILE="$BUILD_DIR/asset-checksums.txt"
RELEASE_FILE="$BUILD_DIR/release.yml"
echo -n "" > "$RELEASE_NOTES_FILE"
echo -n "" > "$CHECKSUMS_FILE"
declare -a assets
upload_asset() {
package_name="$1"
file="$2"
file_name="$(basename "$file")"
echo "$(sha256sum -b "$file" | cut -d ' ' -f 1) ${file_name}" >> "$CHECKSUMS_FILE"
upload_to_package_registry "$file" "$package_name"
assets+=("{\"name\": \"$file_name\",\"url\": \"$GENERIC_PACKAGES_URL/${package_name}/${IRONFOX_VERSION}/${file_name}\",\"link_type\": \"package\",\"direct_asset_path\": \"/${file_name}\"}")
}
# Upload packages to package registry
for apk in "$APK_ARTIFACTS"/*.apk; do
package_name="apk"
upload_asset "$package_name" "$apk"
done
for apks in "$APKS_ARTIFACTS"/*.apks; do
package_name="apkset"
upload_asset "$package_name" "$apks"
done
{
changelog_file="$CI_PROJECT_DIR/changelogs/${IRONFOX_VERSION}.md"
if [[ -f "$changelog_file" ]]; then
cat "$changelog_file"
fi
echo "## Checksums"
echo ""
echo "\`\`\`"
cat $CHECKSUMS_FILE
echo "\`\`\`"
echo ""
echo "---"
echo "_This release was automatically generated by the CI/CD pipeline ([view pipeline]($CI_JOB_URL)) and is guaranteed to be generated from commit [${CI_COMMIT_SHORT_SHA}](${CI_PROJECT_URL}/-/tree/${CI_COMMIT_SHA})._"
echo ""
} >> "$RELEASE_NOTES_FILE"
{
echo "---"
echo "name: IronFox v${IRONFOX_VERSION}"
echo "tag-name: v${IRONFOX_VERSION}"
echo "description: |"
awk '{print " " $0}' < "$RELEASE_NOTES_FILE"
echo "assets-link:"
for asset in "${assets[@]}"; do
echo " - '$asset'"
done
} > "$RELEASE_FILE"