Compare commits

40 Commits
v0.4.0 ... main

Author SHA1 Message Date
John Doe
220bfa2649 docker fix
All checks were successful
Release Workflow / Build Docker image (push) Successful in 2m0s
2026-01-31 11:41:09 -05:00
John Doe
44384b0258 more docker stuff 2026-01-31 11:40:11 -05:00
John Doe
fb872b35b9 update docker 2026-01-31 11:39:06 -05:00
John Doe
14a14a642d update docker 2026-01-31 11:37:39 -05:00
John Doe
096df6427d revert 2026-01-31 11:35:12 -05:00
John Doe
634735d169 swapping to docker hub 2026-01-31 11:33:44 -05:00
John Doe
26e617cb61 release tokem 2026-01-31 11:31:14 -05:00
John Doe
f1361cc59c gitea fix 2026-01-31 11:29:44 -05:00
John Doe
c4ba851410 more docker 2026-01-31 11:28:32 -05:00
John Doe
e8f4b5c284 more fixes 2026-01-31 11:26:54 -05:00
John Doe
18f61cc0dc change docker version 2026-01-31 11:25:30 -05:00
John Doe
1dba8870ee we can get node working 2026-01-31 11:24:04 -05:00
John Doe
103986f5fb i dont even know 2026-01-31 11:22:44 -05:00
John Doe
16189a4abe change order 2026-01-31 11:19:56 -05:00
John Doe
f8a54b956a even more fucking checks 2026-01-31 11:19:03 -05:00
John Doe
d4e87a8110 add more checks 2026-01-31 11:17:38 -05:00
John Doe
b124c185ff change order 2026-01-31 11:16:11 -05:00
John Doe
4cceecdc6c rever podman 2026-01-31 11:14:03 -05:00
John Doe
138635dda4 setup podman compataiblity 2026-01-31 11:13:06 -05:00
John Doe
c1d7ee3d5b removing wait for docker 2026-01-31 11:10:43 -05:00
John Doe
918aa27365 set docker to run 2026-01-31 11:09:27 -05:00
John Doe
fe3b447f2e change order of operations 2026-01-31 11:06:49 -05:00
John Doe
b2114a92b5 update docker 2026-01-31 11:05:12 -05:00
John Doe
3d9cdc58ba start docker 2026-01-31 11:02:59 -05:00
John Doe
d625f0e690 add docker 2026-01-31 10:56:57 -05:00
John Doe
5b57072cfe add node.js 2026-01-31 10:50:56 -05:00
John Doe
09894749ab updated branch 2026-01-31 10:49:21 -05:00
John Doe
ab9407b3dd server build 2026-01-31 10:47:19 -05:00
John Doe
8efe99c25d fixing build 2026-01-30 18:47:27 -05:00
John Doe
96e799d2c2 changing api 2026-01-30 18:39:57 -05:00
John Doe
146dc97a19 change token name 2026-01-30 18:32:44 -05:00
John Doe
2280796351 gitea token 2026-01-30 18:31:40 -05:00
John Doe
f47ebe0f0d revert 2026-01-30 18:23:00 -05:00
John Doe
e02b20f2ad fix upload 2026-01-30 18:20:16 -05:00
John Doe
356939ca7c remove github token 2026-01-30 18:12:54 -05:00
John Doe
bc83cb9fc3 revert 2026-01-30 18:12:37 -05:00
John Doe
2425579f42 fix dep 2026-01-30 18:10:07 -05:00
John Doe
a5d536ed67 revert dep 2026-01-30 18:09:01 -05:00
John Doe
fe4df576b7 update release 2026-01-30 18:06:01 -05:00
John Doe
6bada7bc28 update deps 2026-01-30 17:59:58 -05:00

View File

@@ -1,128 +1,197 @@
name: "publish"
name: Release Workflow
on:
workflow_dispatch: {}
release:
types: [published]
# This can be used to automatically publish nightlies at UTC nighttime
# schedule:
# - cron: "0 2 * * *" # run at 2 AM UTC
# This workflow will trigger on each push to the `release` branch to create or update a GitHub release, build your app, and upload the artifacts to the release.
schedule:
- cron: "0 2 * * *" # run at 2 AM UTC
jobs:
publish-tauri:
web:
name: Build Docker image
runs-on: ubuntu-latest
services:
docker:
image: docker:dind
options: --privileged
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- platform: "macos-14" # for Arm based macs (M1 and above).
args: "--target aarch64-apple-darwin"
- platform: "macos-14" # for Intel based macs.
args: "--target x86_64-apple-darwin"
- platform: "ubuntu-22.04" # for Tauri v1 you could replace this with ubuntu-20.04.
args: ""
- platform: "ubuntu-22.04-arm"
args: "--target aarch64-unknown-linux-gnu"
- platform: "windows-latest"
args: ""
runs-on: ${{ matrix.platform }}
packages: write
contents: read
steps:
- name: Clone repository
- name: Check out the repo
uses: actions/checkout@v4
with:
repository: Drop-OSS/drop
ref: release-prep
submodules: true
fetch-depth: 3 # fix for when this gets triggered by tag
fetch-tags: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Node.js
run: |
git clone --recursive https://free-git.org/Drop-OSS/drop-app.git .
git config --global --add safe.directory $PWD
- name: setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- name: install Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-14' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-22.04-arm' # This must match the platform value defined above.
echo "Installing Node.js manually for better compatibility..."
# Remove any existing broken Node.js installation
rm -rf /root/.cache/act/tool_cache/node || true
# Install Node.js using package manager
if command -v apt-get >/dev/null 2>&1; then
echo "Using apt-get..."
apt-get update
apt-get install -y nodejs npm
elif command -v apk >/dev/null 2>&1; then
echo "Using apk (Alpine)..."
apk add --no-cache nodejs npm
elif command -v yum >/dev/null 2>&1; then
echo "Using yum..."
yum install -y nodejs npm
else
echo "Downloading Node.js directly..."
cd /tmp
if command -v wget >/dev/null 2>&1; then
wget -q https://nodejs.org/dist/v20.11.0/node-v20.11.0-linux-x64.tar.xz
elif command -v curl >/dev/null 2>&1; then
curl -sL https://nodejs.org/dist/v20.11.0/node-v20.11.0-linux-x64.tar.xz -o node-v20.11.0-linux-x64.tar.xz
else
echo "Cannot download Node.js - no download tool available"
exit 1
fi
tar -xf node-v20.11.0-linux-x64.tar.xz
export PATH="/tmp/node-v20.11.0-linux-x64/bin:$PATH"
echo "/tmp/node-v20.11.0-linux-x64/bin" >> $GITHUB_PATH
fi
# Verify installation
echo "Node.js version: $(node --version)"
echo "NPM version: $(npm --version)"
echo "Node.js location: $(which node)"
# Verify Node.js installation
- name: Verify Node.js installation
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf xdg-utils
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
which node || echo "Node not found in PATH"
node --version || echo "Node version command failed"
npm --version || echo "NPM version command failed"
echo "PATH: $PATH"
- name: Import Apple Developer Certificate
if: matrix.platform == 'macos-14'
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
- name: Determine final version
id: get_final_ver
run: |
echo $APPLE_CERTIFICATE | base64 --decode > certificate.p12
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 -u build.keychain
# Ensure Node.js tools are available
if ! command -v node >/dev/null 2>&1; then
echo "Node.js not found, trying alternative version detection..."
if [ -f package.json ]; then
# Try to parse version without jq
BASE_VER="v$(grep '"version"' package.json | sed 's/.*"version": *"\([^"]*\)".*/\1/')"
else
BASE_VER="v0.0.0"
echo "Warning: No package.json found, using default version"
fi
else
# Use jq if available (requires Node.js ecosystem)
if command -v jq >/dev/null 2>&1; then
BASE_VER=v$(jq -r '.version' package.json)
else
# Fallback parsing without jq
BASE_VER="v$(grep '"version"' package.json | sed 's/.*"version": *"\([^"]*\)".*/\1/')"
fi
fi
TODAY=$(date +'%Y.%m.%d')
echo "Today will be: $TODAY"
echo "today=$TODAY" >> $GITHUB_OUTPUT
echo "Created keychain"
if [[ "${{ github.event_name }}" == "release" ]]; then
FINAL_VER="$BASE_VER"
else
FINAL_VER="${BASE_VER}-nightly.$TODAY"
fi
curl https://droposs.org/drop.der --output drop.der
echo "Drop's release tag will be: $FINAL_VER"
echo "final_ver=$FINAL_VER" >> $GITHUB_OUTPUT
# swiftc libs/appletrust/add-certificate.swift
# ./add-certificate drop.der
# rm add-certificate
# echo "Added certificate to keychain using swift util"
## Script is equivalent to:
sudo security authorizationdb write com.apple.trust-settings.admin allow
sudo security add-trusted-cert -d -r trustRoot -k build.keychain -p codeSign -u -1 drop.der
sudo security authorizationdb remove com.apple.trust-settings.admin
security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
echo "Imported certificate"
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain
security find-identity -v -p codesigning build.keychain
- name: Verify Certificate
if: matrix.platform == 'macos-14'
# Update Docker to compatible version
- name: Update Docker
run: |
CERT_INFO=$(security find-identity -v -p codesigning build.keychain | grep "Drop OSS")
CERT_ID=$(echo "$CERT_INFO" | awk -F'"' '{print $2}')
echo "CERT_ID=$CERT_ID" >> $GITHUB_ENV
echo "Certificate imported. Using identity: $CERT_ID"
echo "Current Docker version:"
docker --version || echo "Docker not found"
# Try to update Docker if possible
if command -v apt-get >/dev/null 2>&1; then
echo "Updating Docker via apt..."
apt-get update
apt-get install -y docker.io || echo "Docker update failed, continuing with existing version"
elif command -v apk >/dev/null 2>&1; then
echo "Updating Docker via apk..."
apk add --no-cache docker || echo "Docker update failed, continuing with existing version"
fi
echo "Updated Docker version:"
docker --version
- name: install frontend dependencies
run: pnpm install # change this to npm, pnpm or bun depending on which one you use.
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ env.CERT_ID }}
NO_STRIP: true
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: "Auto-release v__VERSION__"
releaseBody: "See the assets to download this version and install. This release was created automatically."
releaseDraft: false
prerelease: true
args: ${{ matrix.args }}
registry: docker.io
username: getterup
password: ${{ secrets.RELEASE_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
docker.io/getterup/drop-builds
tags: |
type=schedule,pattern=nightly
type=schedule,pattern=nightly.${{ steps.get_final_ver.outputs.today }}
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=ref,event=branch,prefix=branch-
type=ref,event=pr
type=sha
# set latest tag for stable releases
type=raw,value=latest,enable=${{ github.event_name == 'release' && github.event.release.prerelease == false }}
- name: Build and push image
id: build-and-push
run: |
# Ensure Docker client API version is not pinned too low
if [ -n "${DOCKER_API_VERSION}" ]; then
echo "Overriding DOCKER_API_VERSION=${DOCKER_API_VERSION}"
fi
export DOCKER_API_VERSION=1.53
echo "Using DOCKER_API_VERSION=$DOCKER_API_VERSION"
echo "Building image with docker build..."
echo "Tags: ${{ steps.meta.outputs.tags }}"
# Build once with the first tag
FIRST_TAG=$(echo "${{ steps.meta.outputs.tags }}" | head -n1)
if [ -z "$FIRST_TAG" ]; then
echo "No tags produced by metadata action"
exit 1
fi
docker build \
--build-arg BUILD_DROP_VERSION=${{ steps.get_final_ver.outputs.final_ver }} \
-t "$FIRST_TAG" \
.
# Tag remaining tags
echo "${{ steps.meta.outputs.tags }}" | tail -n +2 | while read -r TAG; do
if [ -n "$TAG" ]; then
docker tag "$FIRST_TAG" "$TAG"
fi
done
# Push all tags
echo "${{ steps.meta.outputs.tags }}" | while read -r TAG; do
if [ -n "$TAG" ]; then
docker push "$TAG"
fi
done