added cargo files
This commit is contained in:
14
PinePods-0.8.2/.github/FUNDING.yml
vendored
Normal file
14
PinePods-0.8.2/.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: madeofpendletonwool
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
polar: # Replace with a single Polar username
|
||||
buy_me_a_coffee: collinscoffee
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
16
PinePods-0.8.2/.github/dependabot.yml
vendored
Normal file
16
PinePods-0.8.2/.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "cargo" # See documentation for possible values
|
||||
directory: "/web" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
||||
- package-ecosystem: "pip" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
406
PinePods-0.8.2/.github/workflows/backwards-compatibility.yml
vendored
Normal file
406
PinePods-0.8.2/.github/workflows/backwards-compatibility.yml
vendored
Normal file
@@ -0,0 +1,406 @@
|
||||
name: Database Backwards Compatibility Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
TEST_DB_PASSWORD: "test_password_123!"
|
||||
TEST_DB_NAME: "pinepods_test_db"
|
||||
|
||||
jobs:
|
||||
test-mysql-compatibility:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:latest
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: test_password_123!
|
||||
MYSQL_DATABASE: pinepods_test_db
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: >-
|
||||
--health-cmd="mysqladmin ping"
|
||||
--health-interval=10s
|
||||
--health-timeout=5s
|
||||
--health-retries=3
|
||||
|
||||
valkey:
|
||||
image: valkey/valkey:8-alpine
|
||||
ports:
|
||||
- 6379:6379
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get previous release tag
|
||||
id: get_previous_tag
|
||||
run: |
|
||||
# Get the latest stable release (exclude rc, alpha, beta)
|
||||
PREVIOUS_TAG=$(git tag --sort=-version:refname | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)
|
||||
|
||||
if [ -z "$PREVIOUS_TAG" ]; then
|
||||
echo "No stable release tag found, using 0.7.9 as baseline"
|
||||
PREVIOUS_TAG="0.7.9"
|
||||
fi
|
||||
|
||||
echo "previous_tag=$PREVIOUS_TAG" >> $GITHUB_OUTPUT
|
||||
echo "Using previous tag: $PREVIOUS_TAG"
|
||||
|
||||
- name: Start previous PinePods version
|
||||
run: |
|
||||
echo "🚀 Starting PinePods ${{ steps.get_previous_tag.outputs.previous_tag }}"
|
||||
|
||||
# Create docker-compose for previous version
|
||||
cat > docker-compose.previous.yml << EOF
|
||||
version: '3.8'
|
||||
services:
|
||||
pinepods_previous:
|
||||
image: madeofpendletonwool/pinepods:${{ steps.get_previous_tag.outputs.previous_tag }}
|
||||
environment:
|
||||
DB_TYPE: mysql
|
||||
DB_HOST: mysql
|
||||
DB_PORT: 3306
|
||||
DB_USER: root
|
||||
DB_PASSWORD: ${{ env.TEST_DB_PASSWORD }}
|
||||
DB_NAME: ${{ env.TEST_DB_NAME }}
|
||||
VALKEY_HOST: valkey
|
||||
VALKEY_PORT: 6379
|
||||
HOSTNAME: 'http://localhost:8040'
|
||||
DEBUG_MODE: true
|
||||
SEARCH_API_URL: 'https://search.pinepods.online/api/search'
|
||||
PEOPLE_API_URL: 'https://people.pinepods.online'
|
||||
ports:
|
||||
- "8040:8040"
|
||||
depends_on:
|
||||
- mysql
|
||||
- valkey
|
||||
networks:
|
||||
- test_network
|
||||
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${{ env.TEST_DB_PASSWORD }}
|
||||
MYSQL_DATABASE: ${{ env.TEST_DB_NAME }}
|
||||
networks:
|
||||
- test_network
|
||||
|
||||
valkey:
|
||||
image: valkey/valkey:8-alpine
|
||||
networks:
|
||||
- test_network
|
||||
|
||||
networks:
|
||||
test_network:
|
||||
driver: bridge
|
||||
EOF
|
||||
|
||||
# Start previous version and wait for it to be ready
|
||||
docker compose -f docker-compose.previous.yml up -d
|
||||
|
||||
# Wait for services to be ready
|
||||
echo "⏳ Waiting for previous version to initialize..."
|
||||
sleep 30
|
||||
|
||||
# Check if previous version is responding
|
||||
timeout 60 bash -c 'while ! curl -f http://localhost:8040/api/pinepods_check; do sleep 5; done'
|
||||
echo "✅ Previous version (${{ steps.get_previous_tag.outputs.previous_tag }}) is ready"
|
||||
|
||||
- name: Stop previous version
|
||||
run: |
|
||||
echo "🛑 Stopping previous PinePods version"
|
||||
docker compose -f docker-compose.previous.yml stop pinepods_previous
|
||||
echo "✅ Previous version stopped (database preserved)"
|
||||
|
||||
|
||||
- name: Build current version
|
||||
run: |
|
||||
echo "🔨 Building current PinePods version from source"
|
||||
docker build -f dockerfile -t pinepods-current:test .
|
||||
echo "✅ Build complete"
|
||||
|
||||
- name: Start current version
|
||||
run: |
|
||||
|
||||
# Create docker-compose for current version
|
||||
cat > docker-compose.current.yml << EOF
|
||||
version: '3.8'
|
||||
services:
|
||||
pinepods_current:
|
||||
image: pinepods-current:test
|
||||
environment:
|
||||
DB_TYPE: mysql
|
||||
DB_HOST: mysql
|
||||
DB_PORT: 3306
|
||||
DB_USER: root
|
||||
DB_PASSWORD: ${{ env.TEST_DB_PASSWORD }}
|
||||
DB_NAME: ${{ env.TEST_DB_NAME }}
|
||||
VALKEY_HOST: valkey
|
||||
VALKEY_PORT: 6379
|
||||
HOSTNAME: 'http://localhost:8040'
|
||||
DEBUG_MODE: true
|
||||
SEARCH_API_URL: 'https://search.pinepods.online/api/search'
|
||||
PEOPLE_API_URL: 'https://people.pinepods.online'
|
||||
ports:
|
||||
- "8040:8040"
|
||||
depends_on:
|
||||
- mysql
|
||||
- valkey
|
||||
networks:
|
||||
- test_network
|
||||
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${{ env.TEST_DB_PASSWORD }}
|
||||
MYSQL_DATABASE: ${{ env.TEST_DB_NAME }}
|
||||
networks:
|
||||
- test_network
|
||||
|
||||
valkey:
|
||||
image: valkey/valkey:8-alpine
|
||||
networks:
|
||||
- test_network
|
||||
|
||||
networks:
|
||||
test_network:
|
||||
driver: bridge
|
||||
EOF
|
||||
|
||||
echo "🚀 Starting current PinePods version"
|
||||
# Start current version
|
||||
docker compose -f docker-compose.current.yml up -d pinepods_current
|
||||
|
||||
# Wait for current version to be ready
|
||||
echo "⏳ Waiting for current version to initialize..."
|
||||
sleep 60
|
||||
|
||||
# Check if current version is responding
|
||||
timeout 120 bash -c 'while ! curl -f http://localhost:8040/api/pinepods_check; do echo "Waiting for current version..."; sleep 10; done'
|
||||
echo "✅ Current version is ready"
|
||||
|
||||
- name: Build validator and validate upgraded database
|
||||
run: |
|
||||
echo "🔨 Building database validator"
|
||||
docker build -f Dockerfile.validator -t pinepods-validator .
|
||||
|
||||
echo "🔍 Validating upgraded database schema"
|
||||
docker run --rm --network pinepods_test_network \
|
||||
-e DB_TYPE=mysql \
|
||||
-e DB_HOST=mysql \
|
||||
-e DB_PORT=3306 \
|
||||
-e DB_USER=root \
|
||||
-e DB_PASSWORD=${{ env.TEST_DB_PASSWORD }} \
|
||||
-e DB_NAME=${{ env.TEST_DB_NAME }} \
|
||||
pinepods-validator
|
||||
|
||||
- name: Test basic functionality
|
||||
run: |
|
||||
echo "🧪 Testing basic API functionality"
|
||||
|
||||
# Test health endpoint
|
||||
curl -f http://localhost:8040/api/health || exit 1
|
||||
|
||||
# Test pinepods check endpoint
|
||||
curl -f http://localhost:8040/api/pinepods_check || exit 1
|
||||
|
||||
echo "✅ Basic functionality tests passed"
|
||||
|
||||
- name: Cleanup
|
||||
if: always()
|
||||
run: |
|
||||
echo "🧹 Cleaning up test environment"
|
||||
docker compose -f docker-compose.previous.yml down -v || true
|
||||
docker compose -f docker-compose.current.yml down -v || true
|
||||
|
||||
test-postgresql-compatibility:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:15
|
||||
env:
|
||||
POSTGRES_PASSWORD: test_password_123!
|
||||
POSTGRES_DB: pinepods_test_db
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
valkey:
|
||||
image: valkey/valkey:8-alpine
|
||||
ports:
|
||||
- 6379:6379
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get previous release tag
|
||||
id: get_previous_tag
|
||||
run: |
|
||||
# Get the latest stable release (exclude rc, alpha, beta)
|
||||
PREVIOUS_TAG=$(git tag --sort=-version:refname | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)
|
||||
|
||||
if [ -z "$PREVIOUS_TAG" ]; then
|
||||
echo "No stable release tag found, using 0.7.9 as baseline"
|
||||
PREVIOUS_TAG="0.7.9"
|
||||
fi
|
||||
|
||||
echo "previous_tag=$PREVIOUS_TAG" >> $GITHUB_OUTPUT
|
||||
echo "Using previous tag: $PREVIOUS_TAG"
|
||||
|
||||
- name: Start previous PinePods version
|
||||
run: |
|
||||
echo "🚀 Starting PinePods ${{ steps.get_previous_tag.outputs.previous_tag }} (PostgreSQL)"
|
||||
|
||||
cat > docker-compose.postgres-previous.yml << EOF
|
||||
version: '3.8'
|
||||
services:
|
||||
pinepods_previous:
|
||||
image: madeofpendletonwool/pinepods:${{ steps.get_previous_tag.outputs.previous_tag }}
|
||||
environment:
|
||||
DB_TYPE: postgresql
|
||||
DB_HOST: postgres
|
||||
DB_PORT: 5432
|
||||
DB_USER: postgres
|
||||
DB_PASSWORD: ${{ env.TEST_DB_PASSWORD }}
|
||||
DB_NAME: ${{ env.TEST_DB_NAME }}
|
||||
VALKEY_HOST: valkey
|
||||
VALKEY_PORT: 6379
|
||||
HOSTNAME: 'http://localhost:8040'
|
||||
DEBUG_MODE: true
|
||||
SEARCH_API_URL: 'https://search.pinepods.online/api/search'
|
||||
PEOPLE_API_URL: 'https://people.pinepods.online'
|
||||
ports:
|
||||
- "8040:8040"
|
||||
depends_on:
|
||||
- postgres
|
||||
- valkey
|
||||
networks:
|
||||
- test_network
|
||||
|
||||
postgres:
|
||||
image: postgres:latest
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${{ env.TEST_DB_PASSWORD }}
|
||||
POSTGRES_DB: ${{ env.TEST_DB_NAME }}
|
||||
networks:
|
||||
- test_network
|
||||
|
||||
valkey:
|
||||
image: valkey/valkey:8-alpine
|
||||
networks:
|
||||
- test_network
|
||||
|
||||
networks:
|
||||
test_network:
|
||||
driver: bridge
|
||||
EOF
|
||||
|
||||
docker compose -f docker-compose.postgres-previous.yml up -d
|
||||
sleep 30
|
||||
timeout 60 bash -c 'while ! curl -f http://localhost:8040/api/pinepods_check; do sleep 5; done'
|
||||
|
||||
- name: Stop previous version
|
||||
run: |
|
||||
echo "🛑 Stopping previous PinePods version"
|
||||
docker compose -f docker-compose.postgres-previous.yml stop pinepods_previous
|
||||
echo "✅ Previous version stopped (database preserved)"
|
||||
|
||||
- name: Build current version (PostgreSQL)
|
||||
run: |
|
||||
echo "🔨 Building current PinePods version from source"
|
||||
docker build -f dockerfile -t pinepods-current:test .
|
||||
echo "✅ Build complete"
|
||||
|
||||
- name: Test current version (PostgreSQL)
|
||||
run: |
|
||||
echo "🚀 Starting current PinePods version with PostgreSQL"
|
||||
|
||||
# Create docker-compose for current version
|
||||
cat > docker-compose.postgres-current.yml << EOF
|
||||
version: '3.8'
|
||||
services:
|
||||
pinepods_current:
|
||||
image: pinepods-current:test
|
||||
environment:
|
||||
DB_TYPE: postgresql
|
||||
DB_HOST: postgres
|
||||
DB_PORT: 5432
|
||||
DB_USER: postgres
|
||||
DB_PASSWORD: ${{ env.TEST_DB_PASSWORD }}
|
||||
DB_NAME: ${{ env.TEST_DB_NAME }}
|
||||
VALKEY_HOST: valkey
|
||||
VALKEY_PORT: 6379
|
||||
HOSTNAME: 'http://localhost:8040'
|
||||
DEBUG_MODE: true
|
||||
SEARCH_API_URL: 'https://search.pinepods.online/api/search'
|
||||
PEOPLE_API_URL: 'https://people.pinepods.online'
|
||||
ports:
|
||||
- "8040:8040"
|
||||
depends_on:
|
||||
- postgres
|
||||
- valkey
|
||||
networks:
|
||||
- test_network
|
||||
|
||||
postgres:
|
||||
image: postgres:latest
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${{ env.TEST_DB_PASSWORD }}
|
||||
POSTGRES_DB: ${{ env.TEST_DB_NAME }}
|
||||
networks:
|
||||
- test_network
|
||||
|
||||
valkey:
|
||||
image: valkey/valkey:8-alpine
|
||||
networks:
|
||||
- test_network
|
||||
|
||||
networks:
|
||||
test_network:
|
||||
driver: bridge
|
||||
EOF
|
||||
|
||||
# Start current version
|
||||
docker compose -f docker-compose.postgres-current.yml up -d pinepods_current
|
||||
|
||||
# Wait for current version to be ready
|
||||
echo "⏳ Waiting for current version to initialize..."
|
||||
sleep 60
|
||||
|
||||
# Check if current version is responding
|
||||
timeout 120 bash -c 'while ! curl -f http://localhost:8040/api/pinepods_check; do echo "Waiting for current version..."; sleep 10; done'
|
||||
echo "✅ Current version is ready"
|
||||
|
||||
- name: Build validator and validate upgraded database (PostgreSQL)
|
||||
run: |
|
||||
echo "🔨 Building PostgreSQL database validator"
|
||||
docker build -f Dockerfile.validator.postgres -t pinepods-validator-postgres .
|
||||
|
||||
echo "🔍 Validating upgraded database schema"
|
||||
docker run --rm --network pinepods_test_network \
|
||||
-e DB_TYPE=postgresql \
|
||||
-e DB_HOST=postgres \
|
||||
-e DB_PORT=5432 \
|
||||
-e DB_USER=postgres \
|
||||
-e DB_PASSWORD=${{ env.TEST_DB_PASSWORD }} \
|
||||
-e DB_NAME=${{ env.TEST_DB_NAME }} \
|
||||
pinepods-validator-postgres
|
||||
|
||||
- name: Cleanup
|
||||
if: always()
|
||||
run: |
|
||||
docker compose -f docker-compose.postgres-previous.yml down -v || true
|
||||
docker compose -f docker-compose.postgres-current.yml down -v || true
|
||||
115
PinePods-0.8.2/.github/workflows/build-android-flutter.yml
vendored
Normal file
115
PinePods-0.8.2/.github/workflows/build-android-flutter.yml
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
permissions:
|
||||
contents: write
|
||||
name: Build Android Flutter App
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Manual override version tag (optional)"
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Android Release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Set Image Tag
|
||||
run: echo "IMAGE_TAG=${{ github.event.release.tag_name || github.event.inputs.version || 'latest' }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Fetch full git history for accurate commit count
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: "17"
|
||||
distribution: "temurin"
|
||||
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: "3.35.2"
|
||||
channel: "stable"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd mobile
|
||||
flutter pub get
|
||||
|
||||
- name: Setup Android signing
|
||||
run: |
|
||||
cd mobile/android
|
||||
echo "storePassword=${{ secrets.ANDROID_STORE_PASSWORD }}" > key.properties
|
||||
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> key.properties
|
||||
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> key.properties
|
||||
echo "storeFile=../upload-keystore.jks" >> key.properties
|
||||
echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > upload-keystore.jks
|
||||
|
||||
- name: Verify version files
|
||||
run: |
|
||||
cd mobile
|
||||
echo "Current version in pubspec.yaml:"
|
||||
grep "^version:" pubspec.yaml
|
||||
echo "Current version in environment.dart:"
|
||||
grep "_projectVersion\|_build" lib/core/environment.dart
|
||||
echo "Build will use versions exactly as they are in the repository"
|
||||
|
||||
|
||||
- name: Build APK
|
||||
run: |
|
||||
cd mobile
|
||||
flutter build apk --release --split-per-abi
|
||||
|
||||
- name: Build AAB
|
||||
run: |
|
||||
cd mobile
|
||||
flutter build appbundle --release
|
||||
|
||||
- name: Rename APK files
|
||||
run: |
|
||||
cd mobile/build/app/outputs/flutter-apk
|
||||
# Extract version from IMAGE_TAG (remove 'v' prefix if present)
|
||||
VERSION=${IMAGE_TAG#v}
|
||||
if [[ "$VERSION" == "latest" ]]; then
|
||||
VERSION="0.0.0"
|
||||
fi
|
||||
|
||||
# Rename APK files with proper naming convention
|
||||
mv app-armeabi-v7a-release.apk pinepods-armeabi-${VERSION}.apk
|
||||
mv app-arm64-v8a-release.apk pinepods-arm64-${VERSION}.apk
|
||||
mv app-x86_64-release.apk pinepods-x86_64-${VERSION}.apk
|
||||
|
||||
- name: Upload APK artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: android-apk-builds
|
||||
path: mobile/build/app/outputs/flutter-apk/pinepods-*.apk
|
||||
|
||||
- name: Upload AAB artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: android-aab-build
|
||||
path: mobile/build/app/outputs/bundle/release/app-release.aab
|
||||
|
||||
# - name: Upload to Google Play Store
|
||||
# if: github.event_name == 'release'
|
||||
# env:
|
||||
# GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
|
||||
# run: |
|
||||
# echo "$GOOGLE_PLAY_SERVICE_ACCOUNT_JSON" > service-account.json
|
||||
# # Install fastlane if needed for Play Store upload
|
||||
# # gem install fastlane
|
||||
# # fastlane supply --aab mobile/build/app/outputs/bundle/release/app-release.aab --json_key service-account.json --package_name com.gooseberrydevelopment.pinepods --track production
|
||||
124
PinePods-0.8.2/.github/workflows/build-flatpak.yml
vendored
Normal file
124
PinePods-0.8.2/.github/workflows/build-flatpak.yml
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
name: Build Pinepods Flatpak
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Build Tauri Clients"]
|
||||
types:
|
||||
- completed
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Version to build (for testing)"
|
||||
required: true
|
||||
default: "test"
|
||||
|
||||
env:
|
||||
FLATPAK_ID: com.gooseberrydevelopment.pinepods
|
||||
|
||||
jobs:
|
||||
build-flatpak:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Flatpak
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y flatpak flatpak-builder appstream
|
||||
|
||||
- name: Install Flatpak SDK
|
||||
run: |
|
||||
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak install --user -y flathub org.gnome.Platform//47 org.gnome.Sdk//47
|
||||
|
||||
- name: Clone Flathub repo
|
||||
run: |
|
||||
git clone https://github.com/flathub/com.gooseberrydevelopment.pinepods flathub-repo
|
||||
cp flathub-repo/com.gooseberrydevelopment.pinepods.yml .
|
||||
|
||||
- name: Set VERSION variable
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
|
||||
else
|
||||
LATEST_RELEASE=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .tag_name)
|
||||
echo "VERSION=$LATEST_RELEASE" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Download DEBs and calculate checksums
|
||||
run: |
|
||||
# Download both DEBs
|
||||
curl -L "https://github.com/${{ github.repository }}/releases/download/$VERSION/Pinepods_${VERSION}_amd64.deb" -o amd64.deb
|
||||
curl -L "https://github.com/${{ github.repository }}/releases/download/$VERSION/Pinepods_${VERSION}_arm64.deb" -o arm64.deb
|
||||
|
||||
# Calculate and display checksums
|
||||
AMD64_SHA256=$(sha256sum amd64.deb | cut -d' ' -f1)
|
||||
ARM64_SHA256=$(sha256sum arm64.deb | cut -d' ' -f1)
|
||||
echo "Calculated AMD64 SHA256: $AMD64_SHA256"
|
||||
echo "Calculated ARM64 SHA256: $ARM64_SHA256"
|
||||
|
||||
# Export to environment
|
||||
echo "AMD64_SHA256=$AMD64_SHA256" >> $GITHUB_ENV
|
||||
echo "ARM64_SHA256=$ARM64_SHA256" >> $GITHUB_ENV
|
||||
|
||||
- name: Update manifest version and URL
|
||||
run: |
|
||||
echo "Updating manifest for version: $VERSION"
|
||||
|
||||
# Show environment variables
|
||||
echo "Using AMD64 SHA256: $AMD64_SHA256"
|
||||
echo "Using ARM64 SHA256: $ARM64_SHA256"
|
||||
|
||||
# Update AMD64 entry first
|
||||
sed -i "/.*amd64.deb/,/sha256:/ s|sha256: .*|sha256: $AMD64_SHA256|" com.gooseberrydevelopment.pinepods.yml
|
||||
|
||||
# Update ARM64 entry second
|
||||
sed -i "/.*arm64.deb/,/sha256:/ s|sha256: .*|sha256: $ARM64_SHA256|" com.gooseberrydevelopment.pinepods.yml
|
||||
|
||||
# Update URLs
|
||||
sed -i "s|url: .*amd64.deb|url: https://github.com/${{ github.repository }}/releases/download/$VERSION/Pinepods_${VERSION}_amd64.deb|" com.gooseberrydevelopment.pinepods.yml
|
||||
sed -i "s|url: .*arm64.deb|url: https://github.com/${{ github.repository }}/releases/download/$VERSION/Pinepods_${VERSION}_arm64.deb|" com.gooseberrydevelopment.pinepods.yml
|
||||
|
||||
echo "Updated manifest content:"
|
||||
cat com.gooseberrydevelopment.pinepods.yml
|
||||
|
||||
- name: Get shared Modules
|
||||
run: |
|
||||
git clone https://github.com/flathub/shared-modules
|
||||
|
||||
# Test build steps
|
||||
- name: Build and test Flatpak
|
||||
run: |
|
||||
flatpak-builder --force-clean --sandbox --user --install-deps-from=flathub --ccache \
|
||||
--mirror-screenshots-url=https://dl.flathub.org/media/ --repo=repo builddir \
|
||||
com.gooseberrydevelopment.pinepods.yml
|
||||
|
||||
flatpak remote-add --user --no-gpg-verify test-repo "$(pwd)/repo"
|
||||
flatpak install --user -y test-repo ${{ env.FLATPAK_ID }}
|
||||
|
||||
# Basic launch test (timeout after 30s)
|
||||
timeout 30s flatpak run ${{ env.FLATPAK_ID }} || true
|
||||
|
||||
# Verify metainfo
|
||||
flatpak run --command=cat ${{ env.FLATPAK_ID }} \
|
||||
/app/share/metainfo/${{ env.FLATPAK_ID }}.metainfo.xml
|
||||
|
||||
- name: Create Flatpak bundle
|
||||
run: |
|
||||
flatpak build-bundle repo ${{ env.FLATPAK_ID }}.flatpak ${{ env.FLATPAK_ID }}
|
||||
|
||||
# Archive everything needed for the Flathub PR
|
||||
- name: Archive Flatpak files
|
||||
run: |
|
||||
mkdir flatpak_output
|
||||
cp ${{ env.FLATPAK_ID }}.flatpak flatpak_output/
|
||||
cp com.gooseberrydevelopment.pinepods.yml flatpak_output/
|
||||
tar -czvf flatpak_files.tar.gz flatpak_output
|
||||
|
||||
- name: Upload Flatpak archive
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: flatpak-files
|
||||
path: flatpak_files.tar.gz
|
||||
82
PinePods-0.8.2/.github/workflows/build-helm-chart.yml
vendored
Normal file
82
PinePods-0.8.2/.github/workflows/build-helm-chart.yml
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
name: Build Helm Chart
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Manual override version tag (optional)"
|
||||
required: false
|
||||
|
||||
env:
|
||||
REGISTRY: docker.io
|
||||
IMAGE_NAME: madeofpendletonwool/pinepods
|
||||
CHART_NAME: Pinepods
|
||||
|
||||
jobs:
|
||||
build-helm-chart:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.PUSH_PAT }}
|
||||
persist-credentials: true
|
||||
|
||||
- name: Setup Helm
|
||||
uses: Azure/setup-helm@v4.2.0
|
||||
|
||||
- name: Install yq
|
||||
run: |
|
||||
sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq &&\
|
||||
sudo chmod +x /usr/bin/yq
|
||||
|
||||
- name: Set Chart Version
|
||||
run: |
|
||||
if [ -n "${{ github.event.release.tag_name }}" ]; then
|
||||
version=${{ github.event.release.tag_name }}
|
||||
elif [ -n "${{ github.event.inputs.version }}" ]; then
|
||||
version=${{ github.event.inputs.version }}
|
||||
else
|
||||
echo "No version provided. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
echo "Setting chart version to $version"
|
||||
yq e ".version = \"$version\"" -i deployment/kubernetes/helm/pinepods/Chart.yaml
|
||||
|
||||
- name: Package Helm chart
|
||||
run: |
|
||||
helm dependency update ./deployment/kubernetes/helm/pinepods
|
||||
helm package ./deployment/kubernetes/helm/pinepods --destination ./docs
|
||||
|
||||
- name: Remove old Helm chart
|
||||
run: |
|
||||
ls docs/
|
||||
find docs/ -type f -name "${CHART_NAME}-*.tgz" ! -name "${CHART_NAME}-${{ github.event.release.tag_name }}.tgz" -exec rm {} +
|
||||
|
||||
- name: Update Helm repo index
|
||||
run: |
|
||||
helm repo index docs --url https://helm.pinepods.online
|
||||
|
||||
- name: Fetch all branches
|
||||
run: git fetch --all
|
||||
|
||||
- name: Fetch tags
|
||||
run: git fetch --tags
|
||||
|
||||
- name: Checkout main branch
|
||||
run: git checkout main
|
||||
|
||||
- uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
github_token: ${{ secrets.PUSH_PAT }}
|
||||
committer_name: GitHub Actions
|
||||
committer_email: actions@github.com
|
||||
message: "Update Helm chart for release ${{ github.event.release.tag_name }}"
|
||||
add: "docs"
|
||||
138
PinePods-0.8.2/.github/workflows/build-ios-flutter.yml
vendored
Normal file
138
PinePods-0.8.2/.github/workflows/build-ios-flutter.yml
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
permissions:
|
||||
contents: read
|
||||
name: Build iOS Flutter App
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Manual override version tag (optional)"
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build iOS Release
|
||||
runs-on: macOS-latest
|
||||
|
||||
steps:
|
||||
- name: Set Image Tag
|
||||
run: echo "IMAGE_TAG=${{ github.event.release.tag_name || github.event.inputs.version || 'latest' }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: '3.32.0'
|
||||
channel: 'stable'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd mobile
|
||||
flutter pub get
|
||||
cd ios
|
||||
pod install
|
||||
|
||||
- name: Setup iOS signing
|
||||
env:
|
||||
IOS_CERTIFICATE_BASE64: ${{ secrets.IOS_CERTIFICATE_BASE64 }}
|
||||
IOS_CERTIFICATE_PASSWORD: ${{ secrets.IOS_CERTIFICATE_PASSWORD }}
|
||||
IOS_PROVISIONING_PROFILE_BASE64: ${{ secrets.IOS_PROVISIONING_PROFILE_BASE64 }}
|
||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||||
run: |
|
||||
# Create keychain
|
||||
security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
|
||||
security default-keychain -s build.keychain
|
||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
|
||||
security set-keychain-settings -t 3600 -l build.keychain
|
||||
|
||||
# Import certificate
|
||||
echo "$IOS_CERTIFICATE_BASE64" | base64 -d > certificate.p12
|
||||
security import certificate.p12 -P "$IOS_CERTIFICATE_PASSWORD" -A
|
||||
|
||||
# Install provisioning profile
|
||||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
echo "$IOS_PROVISIONING_PROFILE_BASE64" | base64 -d > ~/Library/MobileDevice/Provisioning\ Profiles/build.mobileprovision
|
||||
|
||||
- name: Update app version
|
||||
run: |
|
||||
cd mobile
|
||||
# Update pubspec.yaml version
|
||||
if [[ "$IMAGE_TAG" != "latest" ]]; then
|
||||
sed -i '' "s/^version: .*/version: ${IMAGE_TAG#v}/" pubspec.yaml
|
||||
fi
|
||||
|
||||
- name: Build iOS app
|
||||
run: |
|
||||
cd mobile
|
||||
flutter build ios --release --no-codesign
|
||||
|
||||
- name: Archive and sign iOS app
|
||||
run: |
|
||||
cd mobile/ios
|
||||
xcodebuild -workspace Runner.xcworkspace \
|
||||
-scheme Runner \
|
||||
-configuration Release \
|
||||
-destination generic/platform=iOS \
|
||||
-archivePath build/Runner.xcarchive \
|
||||
archive
|
||||
|
||||
xcodebuild -exportArchive \
|
||||
-archivePath build/Runner.xcarchive \
|
||||
-exportPath build \
|
||||
-exportOptionsPlist exportOptions.plist
|
||||
|
||||
- name: Create export options plist
|
||||
run: |
|
||||
cd mobile/ios
|
||||
cat > exportOptions.plist << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>method</key>
|
||||
<string>app-store</string>
|
||||
<key>teamID</key>
|
||||
<string>${{ secrets.IOS_TEAM_ID }}</string>
|
||||
<key>uploadBitcode</key>
|
||||
<false/>
|
||||
<key>uploadSymbols</key>
|
||||
<true/>
|
||||
<key>compileBitcode</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
|
||||
- name: Upload IPA artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ios-ipa-build
|
||||
path: mobile/ios/build/*.ipa
|
||||
|
||||
- name: Upload to App Store Connect
|
||||
if: github.event_name == 'release'
|
||||
env:
|
||||
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
|
||||
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
|
||||
APP_STORE_CONNECT_API_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
|
||||
run: |
|
||||
echo "$APP_STORE_CONNECT_API_KEY_BASE64" | base64 -d > AuthKey.p8
|
||||
xcrun altool --upload-app \
|
||||
--type ios \
|
||||
--file mobile/ios/build/*.ipa \
|
||||
--apiKey "$APP_STORE_CONNECT_API_KEY_ID" \
|
||||
--apiIssuer "$APP_STORE_CONNECT_ISSUER_ID"
|
||||
|
||||
- name: Cleanup keychain and provisioning profile
|
||||
if: always()
|
||||
run: |
|
||||
if security list-keychains | grep -q "build.keychain"; then
|
||||
security delete-keychain build.keychain
|
||||
fi
|
||||
rm -f ~/Library/MobileDevice/Provisioning\ Profiles/build.mobileprovision
|
||||
rm -f certificate.p12
|
||||
rm -f AuthKey.p8
|
||||
92
PinePods-0.8.2/.github/workflows/build-snap.yml
vendored
Normal file
92
PinePods-0.8.2/.github/workflows/build-snap.yml
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
name: Build Pinepods Snap
|
||||
|
||||
on:
|
||||
# workflow_run:
|
||||
# workflows: ["Build Tauri Clients"]
|
||||
# types:
|
||||
# - completed
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Version to build (for testing)"
|
||||
required: true
|
||||
default: "test"
|
||||
|
||||
jobs:
|
||||
build-snap:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
|
||||
else
|
||||
LATEST_RELEASE=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .tag_name)
|
||||
echo "VERSION=$LATEST_RELEASE" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Install Snap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y snapd
|
||||
|
||||
- name: Install Snapcraft
|
||||
run: |
|
||||
sudo apt-get install -y snapd
|
||||
sudo snap install core22
|
||||
sudo snap install snapcraft --classic
|
||||
|
||||
- name: Install Multipass
|
||||
run: |
|
||||
sudo snap install multipass --classic
|
||||
|
||||
# - name: Setup LXD
|
||||
# uses: canonical/setup-lxd@main
|
||||
# with:
|
||||
# channel: latest/edge
|
||||
|
||||
- name: Prepare Snap configuration
|
||||
run: |
|
||||
cp clients/snap/snapcraft.yaml ./snapcraft.yaml
|
||||
sudo chown root:root snapcraft.yaml
|
||||
sudo chmod 644 snapcraft.yaml
|
||||
sed -i "s|version: '.*'|version: '$VERSION'|" snapcraft.yaml
|
||||
sed -i "s|url: .*|url: https://github.com/${{ github.repository }}/releases/download/$VERSION/pinepods_${VERSION}_amd64.deb|" snapcraft.yaml
|
||||
sed -i "s|Icon=appname|Icon=/usr/share/icons/hicolor/128x128/apps/com.gooseberrydevelopment.pinepods.png|" snapcraft.yaml
|
||||
|
||||
- name: Configure snapcraft to use Multipass
|
||||
run: |
|
||||
sudo snap set snapcraft provider=multipass
|
||||
|
||||
- name: Nuclear permissions reset
|
||||
run: |
|
||||
sudo rm -rf /root/project || true
|
||||
sudo mkdir -p /root/project
|
||||
sudo cp -r . /root/project/
|
||||
sudo chown -R root:root /root/project
|
||||
sudo chmod -R 777 /root/project
|
||||
sudo chmod -R a+rwx /root/project
|
||||
sudo ls -la /root/project
|
||||
|
||||
- name: Build Snap package
|
||||
env:
|
||||
SNAPCRAFT_PROJECT_DIR: ${{ github.workspace }}
|
||||
run: sudo -E snapcraft --verbose
|
||||
|
||||
- name: Archive Snap files
|
||||
run: |
|
||||
mkdir snap_output
|
||||
cp *.snap snap_output/
|
||||
cp snapcraft.yaml snap_output/
|
||||
tar -czvf snap_files.tar.gz snap_output
|
||||
|
||||
- name: Upload Snap archive
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: snap-files
|
||||
path: snap_files.tar.gz
|
||||
377
PinePods-0.8.2/.github/workflows/build-tauri-clients.yml
vendored
Normal file
377
PinePods-0.8.2/.github/workflows/build-tauri-clients.yml
vendored
Normal file
@@ -0,0 +1,377 @@
|
||||
name: Build Tauri Clients
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Manual override version tag (optional)"
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
compile:
|
||||
name: Compile
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- ubuntu-arm64
|
||||
- macOS-latest
|
||||
- macOS-13
|
||||
- windows-latest
|
||||
include:
|
||||
- os: ubuntu-arm64
|
||||
runs-on: ubuntu-24.04-arm
|
||||
|
||||
runs-on: ${{ matrix.runs-on || matrix.os }}
|
||||
|
||||
env:
|
||||
DEPENDS_SETUP: ${{ startsWith(matrix.os, 'ubuntu-') && 'true' || 'false' }}
|
||||
|
||||
steps:
|
||||
- name: Set Image Tag (Unix)
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: echo "IMAGE_TAG=${{ github.event.release.tag_name || github.event.inputs.version || 'latest' }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set Image Tag (Windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: echo "IMAGE_TAG=${{ github.event.release.tag_name || github.event.inputs.version || 'latest' }}" >> $Env:GITHUB_ENV
|
||||
shell: pwsh
|
||||
|
||||
- name: Set environment variables
|
||||
run: |
|
||||
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
|
||||
echo "ARTIFACT_NAME1=Pinepods_${{ env.IMAGE_TAG }}_amd64.deb" >> $GITHUB_ENV
|
||||
echo "ARTIFACT_NAME2=Pinepods_${{ env.IMAGE_TAG }}_amd64.AppImage" >> $GITHUB_ENV
|
||||
echo "ARTIFACT_NAME3=Pinepods-${{ env.IMAGE_TAG }}-1.x86_64.rpm" >> $GITHUB_ENV
|
||||
elif [ "${{ matrix.os }}" = "ubuntu-arm64" ]; then
|
||||
echo "ARTIFACT_NAME1=Pinepods_${{ env.IMAGE_TAG }}_arm64.deb" >> $GITHUB_ENV
|
||||
echo "ARTIFACT_NAME2=Pinepods_${{ env.IMAGE_TAG }}_aarch64.AppImage" >> $GITHUB_ENV
|
||||
echo "ARTIFACT_NAME3=Pinepods-${{ env.IMAGE_TAG }}-1.aarch64.rpm" >> $GITHUB_ENV
|
||||
# ... rest of conditions ...
|
||||
elif [ "${{ matrix.os }}" = "windows-latest" ]; then
|
||||
echo "ARTIFACT_NAME1=Pinepods_${{ env.IMAGE_TAG }}_x64-setup.exe" >> $Env:GITHUB_ENV
|
||||
echo "ARTIFACT_NAME2=Pinepods_${{ env.IMAGE_TAG }}_x64_en-US.msi" >> $Env:GITHUB_ENV
|
||||
elif [ "${{ matrix.os }}" = "macOS-latest" ]; then
|
||||
echo "ARTIFACT_NAME1=Pinepods_${{ env.IMAGE_TAG }}_aarch64.dmg" >> $GITHUB_ENV
|
||||
echo "ARTIFACT_NAME2=Pinepods.app" >> $GITHUB_ENV
|
||||
elif [ "${{ matrix.os }}" = "macOS-13" ]; then
|
||||
echo "ARTIFACT_NAME1=Pinepods_${{ env.IMAGE_TAG }}_x64.dmg" >> $GITHUB_ENV
|
||||
echo "ARTIFACT_NAME2=Pinepods.app" >> $GITHUB_ENV
|
||||
fi
|
||||
shell: bash
|
||||
if: ${{ matrix.os != 'windows-latest' }}
|
||||
|
||||
- name: Set environment variables (Windows)
|
||||
run: |
|
||||
echo "ARTIFACT_NAME1=Pinepods_${{ env.IMAGE_TAG }}_x64-setup.exe" >> $Env:GITHUB_ENV
|
||||
echo "ARTIFACT_NAME2=Pinepods_${{ env.IMAGE_TAG }}_x64_en-US.msi" >> $Env:GITHUB_ENV
|
||||
shell: pwsh
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: hecrj/setup-rust-action@v2
|
||||
with:
|
||||
rust-version: 1.89
|
||||
targets: wasm32-unknown-unknown
|
||||
|
||||
# Install cargo-binstall for Linux/Windows
|
||||
- name: Install cargo-binstall
|
||||
if: matrix.os != 'macos-latest' && matrix.os != 'macOS-13'
|
||||
uses: cargo-bins/cargo-binstall@main
|
||||
|
||||
- name: Depends install
|
||||
if: ${{ env.DEPENDS_SETUP == 'true' }}
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -qy libgtk-3-dev
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
||||
|
||||
- name: wasm-addition
|
||||
run: |
|
||||
rustup target add wasm32-unknown-unknown
|
||||
|
||||
- name: Install Trunk (macOS)
|
||||
if: matrix.os == 'macos-latest' || matrix.os == 'macOS-13'
|
||||
run: |
|
||||
brew install trunk
|
||||
|
||||
- name: Install Trunk (Linux/Windows)
|
||||
if: matrix.os != 'macos-latest' && matrix.os != 'macOS-13'
|
||||
run: |
|
||||
cargo binstall trunk -y
|
||||
|
||||
- name: Install Tauri
|
||||
run: |
|
||||
cargo install tauri-cli@2.0.0-rc.15 --locked
|
||||
|
||||
- name: Update Tauri version (UNIX)
|
||||
run: |
|
||||
cd web/src-tauri
|
||||
# Use different sed syntax for macOS
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
sed -i '' "s/\"version\": \".*\"/\"version\": \"${IMAGE_TAG}\"/" tauri.conf.json
|
||||
else
|
||||
sed -i "s/\"version\": \".*\"/\"version\": \"${IMAGE_TAG}\"/" tauri.conf.json
|
||||
fi
|
||||
cat tauri.conf.json
|
||||
shell: bash
|
||||
if: ${{ matrix.os != 'windows-latest' }}
|
||||
|
||||
- name: Setup Python
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
- name: Verify directory and update Tauri version (Windows)
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
run: |
|
||||
cd web/src-tauri
|
||||
dir
|
||||
python .\change-version.py tauri.conf.json ${{ env.IMAGE_TAG }}
|
||||
Get-Content tauri.conf.json
|
||||
shell: pwsh
|
||||
|
||||
- name: Build | Compile (UNIX)
|
||||
run: |
|
||||
cd web
|
||||
RUSTFLAGS="--cfg=web_sys_unstable_apis --cfg getrandom_backend=\"wasm_js\"" trunk build --features server_build
|
||||
cd src-tauri
|
||||
cat tauri.conf.json
|
||||
cargo tauri build
|
||||
pwd
|
||||
ls
|
||||
ls -la target/release/bundle
|
||||
shell: bash
|
||||
if: ${{ matrix.os != 'windows-latest' }}
|
||||
|
||||
- name: Build | Compile (Windows)
|
||||
run: |
|
||||
cd web
|
||||
powershell -ExecutionPolicy Bypass -File .\build.ps1
|
||||
cd src-tauri
|
||||
Get-Content tauri.conf.json
|
||||
cargo tauri build
|
||||
ls target/release/bundle
|
||||
shell: pwsh
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
|
||||
# Ubuntu (x86_64) builds
|
||||
- name: Archive builds (Ubuntu)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ubuntu-latest-builds
|
||||
path: |
|
||||
./web/src-tauri/target/release/bundle/deb/${{ env.ARTIFACT_NAME1 }}
|
||||
./web/src-tauri/target/release/bundle/appimage/${{ env.ARTIFACT_NAME2 }}
|
||||
./web/src-tauri/target/release/bundle/rpm/${{ env.ARTIFACT_NAME3 }}
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
|
||||
# Ubuntu ARM64 builds
|
||||
- name: Archive builds (Ubuntu ARM)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ubuntu-arm64-builds
|
||||
path: |
|
||||
./web/src-tauri/target/release/bundle/deb/${{ env.ARTIFACT_NAME1 }}
|
||||
./web/src-tauri/target/release/bundle/appimage/${{ env.ARTIFACT_NAME2 }}
|
||||
./web/src-tauri/target/release/bundle/rpm/${{ env.ARTIFACT_NAME3 }}
|
||||
if: ${{ matrix.os == 'ubuntu-arm64' }}
|
||||
|
||||
# macOS builds - with distinct names
|
||||
- name: Archive build (macOS ARM)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: macos-arm64-builds
|
||||
path: |
|
||||
./web/src-tauri/target/release/bundle/dmg/${{ env.ARTIFACT_NAME1 }}
|
||||
./web/src-tauri/target/release/bundle/macos/${{ env.ARTIFACT_NAME2 }}
|
||||
if: ${{ matrix.os == 'macOS-latest' }}
|
||||
|
||||
- name: Archive build (macOS x64)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: macos-x64-builds
|
||||
path: |
|
||||
./web/src-tauri/target/release/bundle/dmg/${{ env.ARTIFACT_NAME1 }}
|
||||
./web/src-tauri/target/release/bundle/macos/${{ env.ARTIFACT_NAME2 }}
|
||||
if: ${{ matrix.os == 'macOS-13' }}
|
||||
|
||||
- name: Archive build (Windows)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }}-build
|
||||
path: |
|
||||
./web/src-tauri/target/release/bundle/nsis/${{ env.ARTIFACT_NAME1 }}
|
||||
./web/src-tauri/target/release/bundle/msi/${{ env.ARTIFACT_NAME2 }}
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
|
||||
- name: Upload release asset (Ubuntu - DEB)
|
||||
if: github.event_name == 'release' && matrix.os == 'ubuntu-latest'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./web/src-tauri/target/release/bundle/deb/${{ env.ARTIFACT_NAME1 }}
|
||||
asset_name: ${{ env.ARTIFACT_NAME1 }}
|
||||
asset_content_type: application/vnd.debian.binary-package
|
||||
|
||||
- name: Upload release asset (Ubuntu ARM - DEB)
|
||||
if: github.event_name == 'release' && matrix.os == 'ubuntu-arm64'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./web/src-tauri/target/release/bundle/deb/${{ env.ARTIFACT_NAME1 }}
|
||||
asset_name: ${{ env.ARTIFACT_NAME1 }}
|
||||
asset_content_type: application/vnd.debian.binary-package
|
||||
|
||||
- name: Upload release asset (Ubuntu - AppImage)
|
||||
if: github.event_name == 'release' && matrix.os == 'ubuntu-latest'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./web/src-tauri/target/release/bundle/appimage/${{ env.ARTIFACT_NAME2 }}
|
||||
asset_name: ${{ env.ARTIFACT_NAME2 }}
|
||||
asset_content_type: application/x-executable
|
||||
|
||||
- name: Upload release asset (Ubuntu ARM - AppImage)
|
||||
if: github.event_name == 'release' && matrix.os == 'ubuntu-arm64'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./web/src-tauri/target/release/bundle/appimage/${{ env.ARTIFACT_NAME2 }}
|
||||
asset_name: ${{ env.ARTIFACT_NAME2 }}
|
||||
asset_content_type: application/x-executable
|
||||
|
||||
- name: Upload release asset (Ubuntu - RPM)
|
||||
if: github.event_name == 'release' && matrix.os == 'ubuntu-latest'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./web/src-tauri/target/release/bundle/rpm/${{ env.ARTIFACT_NAME3 }}
|
||||
asset_name: ${{ env.ARTIFACT_NAME3 }}
|
||||
asset_content_type: application/x-rpm
|
||||
|
||||
- name: Upload release asset (Ubuntu ARM - RPM)
|
||||
if: github.event_name == 'release' && matrix.os == 'ubuntu-arm64'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./web/src-tauri/target/release/bundle/rpm/${{ env.ARTIFACT_NAME3 }}
|
||||
asset_name: ${{ env.ARTIFACT_NAME3 }}
|
||||
asset_content_type: application/x-rpm
|
||||
|
||||
- name: Upload release asset (macOS - DMG)
|
||||
if: github.event_name == 'release' && (matrix.os == 'macOS-latest' || matrix.os == 'macOS-13')
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./web/src-tauri/target/release/bundle/dmg/${{ env.ARTIFACT_NAME1 }}
|
||||
asset_name: ${{ env.ARTIFACT_NAME1 }}
|
||||
asset_content_type: application/x-apple-diskimage
|
||||
|
||||
- name: Upload release asset (Windows - EXE)
|
||||
if: github.event_name == 'release' && matrix.os == 'windows-latest'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./web/src-tauri/target/release/bundle/nsis/${{ env.ARTIFACT_NAME1 }}
|
||||
asset_name: ${{ env.ARTIFACT_NAME1 }}
|
||||
asset_content_type: application/vnd.microsoft.portable-executable
|
||||
|
||||
- name: Upload release asset (Windows - MSI)
|
||||
if: github.event_name == 'release' && matrix.os == 'windows-latest'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./web/src-tauri/target/release/bundle/msi/${{ env.ARTIFACT_NAME2 }}
|
||||
asset_name: ${{ env.ARTIFACT_NAME2 }}
|
||||
asset_content_type: application/x-msi
|
||||
|
||||
# release:
|
||||
# needs: compile
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v2
|
||||
|
||||
# - name: Download artifacts
|
||||
# uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: ubuntu-latest-build
|
||||
# path: artifacts/ubuntu-latest
|
||||
# - name: Download artifacts
|
||||
# uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: macOS-latest-build
|
||||
# path: artifacts/macOS-latest
|
||||
# - name: Download artifacts
|
||||
# uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: windows-latest-build
|
||||
# path: artifacts/windows-latest
|
||||
|
||||
# - name: Create Release
|
||||
# id: create_release
|
||||
# uses: actions/create-release@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# tag_name: release-${{ github.run_id }}-beta
|
||||
# release_name: Release-${{ github.run_id }}-beta
|
||||
# draft: false
|
||||
# prerelease: true
|
||||
|
||||
# - name: Upload Release Asset
|
||||
# id: upload-release-asset-ubuntu
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
# asset_path: ./artifacts/ubuntu-latest/PinePods
|
||||
# asset_name: PinePods-ubuntu-latest
|
||||
# asset_content_type: application/octet-stream
|
||||
|
||||
# - name: Upload Release Asset
|
||||
# id: upload-release-asset-macos
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
# asset_path: ./artifacts/macOS-latest/PinePods
|
||||
# asset_name: PinePods-macOS-latest
|
||||
# asset_content_type: application/octet-stream
|
||||
|
||||
# - name: Upload Release Asset
|
||||
# id: upload-release-asset-windows
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
# asset_path: ./artifacts/windows-latest/PinePods.exe
|
||||
# asset_name: PinePods-windows-latest.exe
|
||||
# asset_content_type: application/octet-stream
|
||||
103
PinePods-0.8.2/.github/workflows/ci.yaml
vendored
Normal file
103
PinePods-0.8.2/.github/workflows/ci.yaml
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
name: Pinepods CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
backend-tests:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:latest
|
||||
env:
|
||||
POSTGRES_USER: test_user
|
||||
POSTGRES_PASSWORD: test_password
|
||||
POSTGRES_DB: test_db
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
- name: Setup test environment
|
||||
run: |
|
||||
chmod +x ./setup-tests.sh
|
||||
./setup-tests.sh
|
||||
|
||||
- name: Run backend tests
|
||||
env:
|
||||
TEST_MODE: true
|
||||
DB_HOST: localhost
|
||||
DB_PORT: 5432
|
||||
DB_USER: test_user
|
||||
DB_PASSWORD: test_password
|
||||
DB_NAME: test_db
|
||||
DB_TYPE: postgresql
|
||||
TEST_DB_TYPE: postgresql
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
run: |
|
||||
chmod +x ./run-tests.sh
|
||||
./run-tests.sh postgresql
|
||||
|
||||
frontend-tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: hecrj/setup-rust-action@v2
|
||||
with:
|
||||
rust-version: 1.89
|
||||
targets: wasm32-unknown-unknown
|
||||
|
||||
# Install cargo-binstall for other OSes using the standard method
|
||||
- name: Install cargo-binstall
|
||||
if: matrix.os != 'macos-latest'
|
||||
uses: cargo-bins/cargo-binstall@main
|
||||
|
||||
- name: Depends install
|
||||
if: ${{ env.DEPENDS_SETUP == 'true' }}
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -qy libgtk-3-dev
|
||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
||||
|
||||
- name: wasm-addition
|
||||
run: |
|
||||
rustup target add wasm32-unknown-unknown
|
||||
|
||||
- name: Install Trunk
|
||||
run: |
|
||||
cargo binstall trunk -y
|
||||
|
||||
- name: Run frontend tests
|
||||
working-directory: ./web
|
||||
run: |
|
||||
RUSTFLAGS="--cfg=web_sys_unstable_apis" cargo test --features server_build -- --nocapture
|
||||
|
||||
# docker-build:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: [backend-tests, frontend-tests]
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
|
||||
# - name: Set up Docker Buildx
|
||||
# uses: docker/setup-buildx-action@v2
|
||||
|
||||
# - name: Build and test Docker image
|
||||
# run: |
|
||||
# docker build -t pinepods:test .
|
||||
# docker run --rm pinepods:test /bin/sh -c "python3 -m pytest /pinepods/tests/"
|
||||
120
PinePods-0.8.2/.github/workflows/docker-publish.yml
vendored
Normal file
120
PinePods-0.8.2/.github/workflows/docker-publish.yml
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
name: Publish Pinepods Multi-Architecture Image to DockerHub
|
||||
on:
|
||||
release:
|
||||
types: [released]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Manual override version tag (optional)"
|
||||
required: false
|
||||
env:
|
||||
REGISTRY: docker.io
|
||||
IMAGE_NAME: madeofpendletonwool/pinepods
|
||||
jobs:
|
||||
set-env:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
IMAGE_TAG: ${{ steps.set_tags.outputs.IMAGE_TAG }}
|
||||
CREATE_LATEST: ${{ steps.set_tags.outputs.CREATE_LATEST }}
|
||||
steps:
|
||||
- name: Set Image Tag and Latest Tag
|
||||
id: set_tags
|
||||
run: |
|
||||
echo "IMAGE_TAG=${{ github.event.release.tag_name || github.event.inputs.version || 'latest' }}" >> $GITHUB_OUTPUT
|
||||
if [ "${{ github.event_name }}" == "release" ]; then
|
||||
echo "CREATE_LATEST=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "CREATE_LATEST=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
build-and-push-x86:
|
||||
needs: set-env
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_KEY }}
|
||||
- name: Build and push x86 image
|
||||
run: |
|
||||
docker build --platform linux/amd64 --build-arg PINEPODS_VERSION=${{ needs.set-env.outputs.IMAGE_TAG }} -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.set-env.outputs.IMAGE_TAG }}-amd64 -f dockerfile .
|
||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.set-env.outputs.IMAGE_TAG }}-amd64
|
||||
if [ "${{ needs.set-env.outputs.CREATE_LATEST }}" == "true" ]; then
|
||||
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.set-env.outputs.IMAGE_TAG }}-amd64 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-amd64
|
||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-amd64
|
||||
fi
|
||||
|
||||
build-and-push-arm64:
|
||||
needs: set-env
|
||||
runs-on: ubuntu-24.04-arm
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_KEY }}
|
||||
- name: Build and push ARM64 image
|
||||
run: |
|
||||
docker build --platform linux/arm64 --build-arg PINEPODS_VERSION=${{ needs.set-env.outputs.IMAGE_TAG }} -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.set-env.outputs.IMAGE_TAG }}-arm64 -f dockerfile-arm .
|
||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.set-env.outputs.IMAGE_TAG }}-arm64
|
||||
if [ "${{ needs.set-env.outputs.CREATE_LATEST }}" == "true" ]; then
|
||||
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.set-env.outputs.IMAGE_TAG }}-arm64 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-arm64
|
||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-arm64
|
||||
fi
|
||||
|
||||
create-manifests:
|
||||
needs: [set-env, build-and-push-x86, build-and-push-arm64]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_KEY }}
|
||||
|
||||
- name: Create and push Docker manifest for the version tag
|
||||
run: |
|
||||
sleep 10
|
||||
# Pull the images first to ensure they're available
|
||||
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.set-env.outputs.IMAGE_TAG }}-amd64
|
||||
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.set-env.outputs.IMAGE_TAG }}-arm64
|
||||
|
||||
# Create and push manifest
|
||||
docker manifest create ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.set-env.outputs.IMAGE_TAG }} \
|
||||
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.set-env.outputs.IMAGE_TAG }}-amd64 \
|
||||
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.set-env.outputs.IMAGE_TAG }}-arm64
|
||||
|
||||
docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.set-env.outputs.IMAGE_TAG }}
|
||||
|
||||
- name: Create and push Docker manifest for the latest tag
|
||||
if: needs.set-env.outputs.CREATE_LATEST == 'true'
|
||||
run: |
|
||||
docker manifest create ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
|
||||
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-amd64 \
|
||||
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-arm64
|
||||
docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
93
PinePods-0.8.2/.github/workflows/nightly-docker-publish.yml
vendored
Normal file
93
PinePods-0.8.2/.github/workflows/nightly-docker-publish.yml
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
name: Publish Pinepods Nightly Multi-Architecture Image to DockerHub
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "23 1 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
REGISTRY: docker.io
|
||||
IMAGE_NAME: madeofpendletonwool/pinepods
|
||||
NIGHTLY_TAG: nightly
|
||||
|
||||
jobs:
|
||||
build-and-push-nightly-x86:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_KEY }}
|
||||
|
||||
- name: Build and push x86 image
|
||||
run: |
|
||||
docker build --platform linux/amd64 -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.NIGHTLY_TAG }}-amd64 -f dockerfile .
|
||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.NIGHTLY_TAG }}-amd64
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
||||
build-and-push-nightly-arm64:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_KEY }}
|
||||
|
||||
- name: Build and push ARMv8 image
|
||||
run: |
|
||||
docker build --platform linux/arm64 -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.NIGHTLY_TAG }}-arm64 -f dockerfile-arm .
|
||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.NIGHTLY_TAG }}-arm64
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
||||
manifest-nightly:
|
||||
needs: [build-and-push-nightly-x86, build-and-push-nightly-arm64]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_KEY }}
|
||||
|
||||
- name: Create and push Docker manifest for the nightly tag
|
||||
run: |
|
||||
docker manifest create ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.NIGHTLY_TAG }} \
|
||||
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.NIGHTLY_TAG }}-amd64 \
|
||||
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.NIGHTLY_TAG }}-arm64
|
||||
docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.NIGHTLY_TAG }}
|
||||
67
PinePods-0.8.2/.github/workflows/notification.yml
vendored
Normal file
67
PinePods-0.8.2/.github/workflows/notification.yml
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
name: Notifications on release
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Publish Pinepods Multi-Architecture Image to DockerHub"]
|
||||
types:
|
||||
- completed
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
message_text:
|
||||
description: "Manual override text (optional)"
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
discord_announcement:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Fetch the latest release
|
||||
id: fetch_release
|
||||
run: |
|
||||
latest_release=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.tag_name')
|
||||
release_url=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.html_url')
|
||||
echo "Latest release version: $latest_release"
|
||||
echo "Release URL: $release_url"
|
||||
echo "::set-output name=version::$latest_release"
|
||||
echo "::set-output name=release_url::$release_url"
|
||||
|
||||
# Check if this is an RC release
|
||||
if [[ "$latest_release" == *"-rc"* ]]; then
|
||||
echo "RC release detected, skipping Discord notification"
|
||||
echo "::set-output name=is_rc::true"
|
||||
else
|
||||
echo "::set-output name=is_rc::false"
|
||||
fi
|
||||
|
||||
- name: Set release message
|
||||
id: set_message
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||
echo "::set-output name=message::${{ github.event.inputs.message_text }}"
|
||||
else
|
||||
version="${{ steps.fetch_release.outputs.version }}"
|
||||
release_url="${{ steps.fetch_release.outputs.release_url }}"
|
||||
message="Pinepods Version $version Released! Check out the release [here]($release_url)"
|
||||
echo "::set-output name=message::$message"
|
||||
fi
|
||||
|
||||
- name: Skip Discord notification for RC release
|
||||
if: steps.fetch_release.outputs.is_rc == 'true'
|
||||
run: |
|
||||
echo "Skipping Discord notification for RC release: ${{ steps.fetch_release.outputs.version }}"
|
||||
|
||||
- name: Discord notification to announce deployment
|
||||
if: steps.fetch_release.outputs.is_rc == 'false'
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: ${{ steps.set_message.outputs.message }}
|
||||
53
PinePods-0.8.2/.github/workflows/pre-release-version-update.yml
vendored
Normal file
53
PinePods-0.8.2/.github/workflows/pre-release-version-update.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: Pre-Release Version Update
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Version to set (e.g., 0.8.0)"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
update-version:
|
||||
name: Update Version Files
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Update app version
|
||||
run: |
|
||||
cd mobile
|
||||
VERSION_NAME=${{ github.event.inputs.version }}
|
||||
# Calculate what the git count WILL BE after we commit (current + 1)
|
||||
BUILD_NUMBER=$(($(git rev-list --count HEAD) + 1 + 20250000))
|
||||
|
||||
# Update pubspec.yaml version
|
||||
sed -i "s/^version: .*/version: ${VERSION_NAME}+${BUILD_NUMBER}/" pubspec.yaml
|
||||
|
||||
# Update environment.dart constants
|
||||
sed -i "s/static const _projectVersion = '[^']*';/static const _projectVersion = '${VERSION_NAME}';/" lib/core/environment.dart
|
||||
sed -i "s/static const _build = '[^']*';/static const _build = '${BUILD_NUMBER}';/" lib/core/environment.dart
|
||||
|
||||
echo "Updated version to ${VERSION_NAME}+${BUILD_NUMBER}"
|
||||
|
||||
- name: Commit and push version update
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
git add mobile/pubspec.yaml mobile/lib/core/environment.dart
|
||||
git commit -m "chore: update version to ${{ github.event.inputs.version }} [skip ci]"
|
||||
git push
|
||||
|
||||
- name: Summary
|
||||
run: |
|
||||
echo "✅ Version updated to ${{ github.event.inputs.version }}"
|
||||
echo "📋 Next steps:"
|
||||
echo "1. Create a GitHub release pointing to the latest commit"
|
||||
echo "2. The release workflow will build from that exact commit"
|
||||
echo "3. Version files will match the commit for reproducible builds"
|
||||
43
PinePods-0.8.2/.github/workflows/static.yml
vendored
Normal file
43
PinePods-0.8.2/.github/workflows/static.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
# Simple workflow for deploying static content to GitHub Pages
|
||||
name: Deploy static content to Pages
|
||||
|
||||
on:
|
||||
# Runs on pushes targeting the default branch
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
# Single deploy job since we're just deploying
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
# Upload entire repository
|
||||
path: './docs'
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
41
PinePods-0.8.2/.github/workflows/test-pinepods.yml
vendored
Normal file
41
PinePods-0.8.2/.github/workflows/test-pinepods.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Test Pinepods
|
||||
on:
|
||||
# pull_request:
|
||||
# types:
|
||||
# - opened
|
||||
# - synchronize
|
||||
# branches: [ master ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build the Docker test container
|
||||
run: docker build -t madeofpendletonwool/pinepods-test . -f dockerfile-test
|
||||
- uses: rustsec/audit-check@v1.4.1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Run tests in the Docker container
|
||||
run: docker run madeofpendletonwool/pinepods-test
|
||||
|
||||
cache-checkmate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: taiki-e/cache-cargo-install-action@v1
|
||||
with:
|
||||
tool: cargo-checkmate
|
||||
|
||||
run-phase:
|
||||
strategy:
|
||||
matrix:
|
||||
phase: [audit, build, check, clippy, doc, test]
|
||||
needs: cache-checkmate
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: taiki-e/cache-cargo-install-action@v1
|
||||
with:
|
||||
tool: cargo-checkmate
|
||||
- uses: actions/checkout@v4
|
||||
- run: cargo-checkmate run ${{ matrix.phase }}
|
||||
98
PinePods-0.8.2/.github/workflows/update-aur-package.yml
vendored
Normal file
98
PinePods-0.8.2/.github/workflows/update-aur-package.yml
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
name: Update AUR Package
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Build Tauri Clients"]
|
||||
types:
|
||||
- completed
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Version tag (e.g. 0.6.6)"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
update-aur-package:
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set version
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
|
||||
else
|
||||
# Extract version from the triggering release
|
||||
RELEASE_TAG=$(curl -s "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r .tag_name)
|
||||
echo "VERSION=$RELEASE_TAG" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Generate PKGBUILD
|
||||
run: |
|
||||
# Calculate checksums for both architectures
|
||||
x86_64_url="https://github.com/madeofpendletonwool/PinePods/releases/download/$VERSION/Pinepods_${VERSION}_amd64.deb"
|
||||
aarch64_url="https://github.com/madeofpendletonwool/PinePods/releases/download/$VERSION/Pinepods_${VERSION}_arm64.deb"
|
||||
|
||||
echo "Downloading and calculating checksums..."
|
||||
curl -L "$x86_64_url" -o x86_64.deb
|
||||
curl -L "$aarch64_url" -o aarch64.deb
|
||||
|
||||
x86_64_sum=$(sha256sum x86_64.deb | cut -d' ' -f1)
|
||||
aarch64_sum=$(sha256sum aarch64.deb | cut -d' ' -f1)
|
||||
|
||||
cat > PKGBUILD << EOF
|
||||
pkgname=pinepods
|
||||
pkgver=$VERSION
|
||||
pkgrel=1
|
||||
pkgdesc="Pinepods is a complete podcast management system and allows you to play, download, and keep track of podcasts you enjoy. All self hosted and enjoyed on your own server!"
|
||||
arch=('x86_64' 'aarch64')
|
||||
url="https://github.com/madeofpendletonwool/PinePods"
|
||||
license=('gpl3')
|
||||
depends=('cairo' 'desktop-file-utils' 'gdk-pixbuf2' 'glib2' 'gtk3' 'hicolor-icon-theme' 'libsoup' 'pango' 'webkit2gtk')
|
||||
options=('!strip' '!emptydirs')
|
||||
source_x86_64=("https://github.com/madeofpendletonwool/PinePods/releases/download/\${pkgver}/Pinepods_\${pkgver}_amd64.deb")
|
||||
source_aarch64=("https://github.com/madeofpendletonwool/PinePods/releases/download/\${pkgver}/Pinepods_\${pkgver}_arm64.deb")
|
||||
sha256sums_x86_64=('$x86_64_sum')
|
||||
sha256sums_aarch64=('$aarch64_sum')
|
||||
|
||||
package() {
|
||||
# Extract the .deb package
|
||||
cd "\$srcdir"
|
||||
tar xf data.tar.gz -C "\$pkgdir/"
|
||||
|
||||
# Create symlink from /usr/bin/app to /usr/bin/pinepods
|
||||
ln -s /usr/bin/app "\$pkgdir/usr/bin/pinepods"
|
||||
|
||||
# Ensure correct permissions
|
||||
chmod 755 "\$pkgdir/usr/bin/app"
|
||||
chmod 644 "\$pkgdir/usr/share/applications/Pinepods.desktop"
|
||||
find "\$pkgdir/usr/share/icons" -type f -exec chmod 644 {} +
|
||||
find "\$pkgdir" -type d -exec chmod 755 {} +
|
||||
}
|
||||
EOF
|
||||
|
||||
- name: Test PKGBUILD
|
||||
uses: KSXGitHub/github-actions-deploy-aur@v3.0.1
|
||||
with:
|
||||
pkgname: pinepods
|
||||
pkgbuild: ./PKGBUILD
|
||||
test: true
|
||||
commit_username: ${{ secrets.GIT_USER }}
|
||||
commit_email: ${{ secrets.GIT_EMAIL }}
|
||||
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
||||
commit_message: "Update to version ${{ env.VERSION }}"
|
||||
ssh_keyscan_types: rsa,ecdsa,ed25519
|
||||
|
||||
- name: Publish AUR package
|
||||
if: success()
|
||||
uses: KSXGitHub/github-actions-deploy-aur@v3.0.1
|
||||
with:
|
||||
pkgname: pinepods
|
||||
pkgbuild: ./PKGBUILD
|
||||
commit_username: ${{ secrets.GIT_USER }}
|
||||
commit_email: ${{ secrets.GIT_EMAIL }}
|
||||
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
||||
commit_message: "Update to version ${{ env.VERSION }}"
|
||||
ssh_keyscan_types: rsa,ecdsa,ed25519
|
||||
Reference in New Issue
Block a user