2025-02-12 13:07:57 +00:00
|
|
|
name: Build Luncher for Windows/AMD64/Nightly
|
|
|
|
|
|
|
|
on:
|
2025-02-12 22:32:46 +00:00
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * *"
|
2025-02-12 13:07:57 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-windows:
|
|
|
|
runs-on: win-10
|
|
|
|
|
|
|
|
steps:
|
2025-02-12 13:42:18 +00:00
|
|
|
- name: Clone Publisher repo
|
2025-02-12 13:07:57 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2025-02-12 13:36:30 +00:00
|
|
|
git clone https://weforge.xyz/Spitfire/Publisher.git
|
2025-02-12 13:07:57 +00:00
|
|
|
|
|
|
|
- name: Clone and Build Spitfire Luncher
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
git clone https://weforge.xyz/Spitfire/Luncher.git
|
|
|
|
cd Luncher
|
|
|
|
CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o spitfire-luncher.exe
|
|
|
|
mv spitfire-luncher.exe ..
|
|
|
|
|
2025-02-15 10:03:36 +00:00
|
|
|
- name: Download logo image for luncher (with temporary link)
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mkdir -p spm
|
2025-02-16 22:02:59 +00:00
|
|
|
curl -L -o spm/logo.png "https://weforge.xyz/Spitfire/Branding/raw/commit/f1a70addd443f91b98bea8ff9cc924af1ac67600/logo6-only-plane.png"
|
2025-02-15 10:03:36 +00:00
|
|
|
|
2025-02-12 13:07:57 +00:00
|
|
|
- name: Setup SSH Key for SourceForge
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
SF_SSH_KEY: ${{ secrets.SF_SSH_KEY }}
|
|
|
|
run: |
|
|
|
|
echo "$SF_SSH_KEY" | sed 's/\\n/\n/g' | tr -d '\r' > sf_key
|
|
|
|
chmod 600 sf_key
|
|
|
|
|
|
|
|
- name: Download existing APPINDEX
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
SF_USER: ${{ secrets.SF_USER }}
|
|
|
|
run: |
|
|
|
|
scp -i sf_key -o IdentitiesOnly=yes \
|
|
|
|
"$SF_USER@frs.sourceforge.net:/home/frs/project/spitfire-browser/APPINDEX" \
|
|
|
|
APPINDEX || true
|
|
|
|
|
|
|
|
- name: Compress artifact
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2025-02-15 10:03:36 +00:00
|
|
|
tar -czf spitfire-luncher-amd64-nightly-windows.tar.gz spitfire-luncher.exe spm/luncher.png
|
2025-02-12 13:07:57 +00:00
|
|
|
ls -l
|
|
|
|
|
|
|
|
- name: Prepare installer folder structure and move artifact
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
# Compute current date (e.g. 2025.02.11)
|
|
|
|
DATE=$(date +'%Y.%m.%d')
|
|
|
|
# Create a separate packaging folder "upload" to avoid conflicts with the cloned repo folder.
|
|
|
|
mkdir -p upload/luncher/amd64/nightly/$DATE
|
|
|
|
mv spitfire-luncher-amd64-nightly-windows.tar.gz upload/luncher/amd64/nightly/$DATE/
|
|
|
|
# Save the date for later steps.
|
|
|
|
echo "$DATE" > date.txt
|
|
|
|
|
|
|
|
- name: Upload installer artifact to SourceForge
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
SF_USER: ${{ secrets.SF_USER }}
|
|
|
|
run: |
|
|
|
|
# Read the date from file (if needed later)
|
|
|
|
DATE=$(cat date.txt)
|
|
|
|
# Upload the entire packaging folder recursively.
|
|
|
|
scp -r -i sf_key -o IdentitiesOnly=yes upload/luncher "$SF_USER@frs.sourceforge.net:/home/frs/project/spitfire-browser/"
|
|
|
|
|
|
|
|
- name: Update APPINDEX
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
DATE=$(cat date.txt)
|
2025-02-12 13:42:18 +00:00
|
|
|
cd Publisher
|
2025-02-12 13:07:57 +00:00
|
|
|
cp ../APPINDEX . || true
|
|
|
|
go run update_appindex.go \
|
|
|
|
--name "spitfire-luncher" \
|
|
|
|
--release "nightly" \
|
|
|
|
--version "$DATE" \
|
|
|
|
--arch "amd64" \
|
|
|
|
--description "Nightly build" \
|
|
|
|
--url "https://spitfirebrowser.xyz/" \
|
|
|
|
--license "AGPL-3.0" \
|
|
|
|
--origin "luncher" \
|
|
|
|
--maintainer "Internet Addict" \
|
|
|
|
--dependencies "" \
|
|
|
|
--platform "windows" \
|
|
|
|
--icon "https://weforge.xyz/Spitfire/Branding/raw/branch/main/active/browser/icon.svg" \
|
|
|
|
--screenshots "https://spitfirebrowser.xyz/static/images/screenshots/1.png" \
|
|
|
|
--tags "browser,experimental,testing" \
|
|
|
|
--notes "Automated build of Spitfire" \
|
|
|
|
--remotePath "luncher/amd64/nightly/$DATE/spitfire-luncher-amd64-nightly-windows.tar.gz" \
|
|
|
|
--compressedFile "spitfire-luncher-amd64-nightly-windows.tar.gz" \
|
|
|
|
--uncompressedFile "spitfire-luncher.exe"
|
|
|
|
cp APPINDEX ../
|
|
|
|
|
|
|
|
- name: Upload updated APPINDEX
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
SF_USER: ${{ secrets.SF_USER }}
|
|
|
|
run: |
|
|
|
|
scp -i sf_key -o IdentitiesOnly=yes APPINDEX "$SF_USER@frs.sourceforge.net:/home/frs/project/spitfire-browser/APPINDEX"
|
|
|
|
|
|
|
|
- name: Cleanup SSH Key
|
|
|
|
if: always()
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
rm -f sf_key
|