Build x86_64 #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build x86_64 | |
on: | |
workflow_dispatch | |
# If previous workflow is still running, we push again, we will cancel the previous workflow | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install build depends | |
run: | | |
sudo add-apt-repository -y ppa:flatpak/stable | |
sudo apt-get update -q | |
sudo apt-get install -y flatpak flatpak-builder ca-certificates gnupg software-properties-common | |
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.PASSPHRASE }} | |
- name: Build | |
run: | | |
git config --global protocol.file.allow always | |
declare -a apps=( | |
"manifests/io.github.wgh136.pixes/io.github.wgh136.pixes.yml" | |
"manifests/io.github.venera_app.venera/io.github.venera_app.venera.yml" | |
"manifests/com.xiaoyaocz.simplelive/com.xiaoyaocz.simplelive.yml" | |
"manifests/top.jtmonster.jhentai/top.jtmonster.jhentai.yml" | |
"manifests/com.qq.weixin/com.qq.weixin.yml" | |
"manifests/cn.wps.office/cn.wps.office.yml" | |
"manifests/com.qq.qq/com.qq.qq.yml" | |
"manifests/com.qq.docs/com.qq.docs.yml" | |
"manifests/com.qq.qqmusic/com.qq.qqmusic.yml" | |
"manifests/io.github.c0re100.qbittorrent-enhanced-edition/io.github.c0re100.qbittorrent-enhanced-edition.yml" | |
"manifests/io.github.msojocs.bilibili/io.github.msojocs.bilibili.yml" | |
"manifests/org.freedesktop.xorg.xeyes/org.freedesktop.xorg.xeyes.yml" | |
"manifests/com.cursor.cursor/com.cursor.cursor.yml" | |
"manifests/io.github.pbh_btn.peerbanhelper/io.github.pbh_btn.peerbanhelper.yml" | |
"manifests/com.larksuite.lark/com.larksuite.lark.yml" | |
"manifests/org.freedesktop.Platform.Electron/org.freedesktop.Platform.Electron.yml" | |
) | |
for app in "${apps[@]}"; do | |
flatpak-builder build-dir "$app" \ | |
--repo=repo \ | |
--default-branch=stable \ | |
--force-clean \ | |
--user \ | |
--install-deps-from=flathub \ | |
--gpg-sign=${{ secrets.GPG_KEY_FINGERPRINT }} \ | |
--ccache \ | |
--disable-rofiles-fuse | |
done | |
- name: Sign repo | |
run: | | |
flatpak build-sign repo --gpg-sign=${{ secrets.GPG_KEY_FINGERPRINT }} | |
- name: Upload to R2 | |
uses: ryand56/r2-upload-action@latest # Can be any release | |
with: | |
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} | |
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} | |
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
r2-bucket: ${{ secrets.R2_BUCKET }} | |
source-dir: repo | |
destination-dir: repo # Can be anything as long as it is an actual path | |
output-file-url: 'true' # defaults to true | |
multipart-size: 100 # If the file size is greater than the value provided here, then use multipart upload | |
max-retries: 5 # The maximum number of retries it takes to upload a multipart chunk until it moves on to the next part | |
multipart-concurrent: true # Whether to concurrently upload a multipart chunk | |
keep-file-fresh: 'true' # defaults to false |