ci: add rolling Gitea release workflow and release publisher
Rolling Release / Build & Publish Rolling Release (push) Canceled after 0s
Rolling Release / Build & Publish Rolling Release (push) Canceled after 0s
This commit is contained in:
1 parent
7139a64544
commit
80c16ad6ad
5 files changed
+477
-33
No files matched your search
@@ -0,0 +1,86 @@
|
||||
name: Rolling Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: moon-i2p-rolling-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build-and-release:
|
||||
name: Build & Publish Rolling Release
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.site.latha.org/cluster-services/android-sdk:latest
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install native & packaging dependencies
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get install -y -qq --no-install-recommends gcc libc6-dev squashfs-tools librsvg2-bin >/dev/null
|
||||
|
||||
- name: Install MoonBit toolchain
|
||||
run: |
|
||||
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
|
||||
echo "$HOME/.moon/bin" >> "$GITHUB_PATH"
|
||||
"$HOME/.moon/bin/moon" version --all
|
||||
|
||||
- name: Run MoonBit tests & script/extension checks
|
||||
run: |
|
||||
moon update
|
||||
moon test --target wasm
|
||||
moon test --target js
|
||||
moon test --target native
|
||||
node --check \
|
||||
extensions/firefox-i2p-torrent/background.js \
|
||||
extensions/firefox-i2p-torrent/content.js \
|
||||
extensions/firefox-i2p-torrent/ui.js \
|
||||
extensions/firefox-i2p-torrent/start.js
|
||||
python3 -m json.tool extensions/firefox-i2p-torrent/manifest.json >/dev/null
|
||||
python3 -m py_compile \
|
||||
scripts/build_appimage.py \
|
||||
scripts/build_apk.py \
|
||||
scripts/moon_i2p_native_host.py \
|
||||
scripts/publish_rolling_release.py
|
||||
|
||||
- name: Compute release version metadata
|
||||
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch')
|
||||
run: |
|
||||
ext_ver=$(python3 -c 'import json; print(json.load(open("extensions/firefox-i2p-torrent/manifest.json"))["version"])')
|
||||
short_sha="${GITHUB_SHA:0:7}"
|
||||
ver_code=$(( $(date +%s) / 60 ))
|
||||
{
|
||||
echo "MOON_I2P_VERSION_CODE=$ver_code"
|
||||
echo "MOON_I2P_VERSION_NAME=${ext_ver}-rolling.${short_sha}"
|
||||
} >> "$GITHUB_ENV"
|
||||
|
||||
- name: Build Linux x86_64 AppImage & Firefox XPI
|
||||
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch')
|
||||
run: |
|
||||
python3 scripts/build_appimage.py
|
||||
bash -n .cache/appimage/AppDir/AppRun
|
||||
|
||||
- name: Build Android APK
|
||||
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch')
|
||||
env:
|
||||
ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }}
|
||||
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
|
||||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
ANDROID_KEY_PASS: ${{ secrets.ANDROID_KEY_PASS }}
|
||||
run: python3 scripts/build_apk.py
|
||||
|
||||
- name: Publish rolling release
|
||||
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch')
|
||||
env:
|
||||
GITEA_TOKEN: ${{ github.token }}
|
||||
APK_SIGNED_WITH: ${{ secrets.ANDROID_KEYSTORE_B64 != '' && 'release' || 'debug' }}
|
||||
run: python3 scripts/publish_rolling_release.py
|
||||
Reference in new issue
Block a user