diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8570aad..3e61d13 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,7 +7,7 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} + IMAGE_NAME: ${{ github.repository_owner }}/sup-server jobs: build: @@ -32,17 +32,15 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} + type=semver,pattern=v{{version}} + type=semver,pattern=v{{major}}.{{minor}} type=raw,value=latest,enable={{is_default_branch}} - name: Build and push uses: docker/build-push-action@v5 with: context: . + file: ./server/Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/README.md b/README.md index 3f68254..2294128 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,6 @@ For the optional Proton Mail integration, SUP requires a server that runs Proton ### 1. Proton Mail Integration -> ⚠️ **Early Alpha**: Currently only `docker-compose.dev.yml` dev deployments are available. - A Proton Mail Bridge is optionally available if you want to receive push notifications for incoming emails. > **Note:** The default Proton Mail Bridge image uses `shenxn/protonmail-bridge:build` which compiles from source and supports multiple architectures. For x86_64 systems, you can use `shenxn/protonmail-bridge:latest` (pre-built binary, smaller and faster). For ARM devices (Raspberry Pi), stick with `:build`. @@ -74,8 +72,6 @@ Note that the bridge will first need to sync all of your old emails before you c ### 2. Install SUP Server -> ⚠️ **Early Alpha**: Currently only `docker-compose.dev.yml` dev deployments are available. - ```bash # Download docker-compose.yml curl -L -O https://raw.githubusercontent.com/lone-cloud/sup/master/docker-compose.yml @@ -148,9 +144,9 @@ docker compose -f docker-compose.dev.yml up protonmail-bridge ### Proton Mail Notifications -Receive instant Signal notifications when new emails arrive in your Proton Mail inbox. +Receive Signal notifications when new emails arrive in your Proton Mail inbox. -SUP monitors your Proton Mail account via the local Proton Mail Bridge and forwards email alerts through Signal. This relies on the same technology that a third-party email client like Thunderbird would be using to integrate with Proton Mail. +SUP monitors a Proton Mail account via the local bridge and forwards email alerts through Signal. This relies on the same technology that a third-party email client like Thunderbird would be using to integrate with Proton Mail. ### Home Assistant Alerts diff --git a/assets/screenshots/2.webp b/assets/screenshots/2.webp index b105c76..b3f26a1 100644 Binary files a/assets/screenshots/2.webp and b/assets/screenshots/2.webp differ diff --git a/package.json b/package.json index ac3b375..3aa343e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sup", - "version": "0.1.0", + "version": "0.1.1", "description": "Privacy-preserving push notifications using Signal as transport", "private": true, "type": "module", @@ -19,7 +19,7 @@ "build": "bun build --compile server/index.ts --outfile server/sup-server", "check": "tsc --noEmit && biome check .", "fix": "biome check --write --unsafe .", - "docker:release": "bun run scripts/release-docker.ts" + "release": "bun run scripts/release.ts" }, "dependencies": { "chalk": "5.6.2", diff --git a/scripts/release-docker.ts b/scripts/release-docker.ts deleted file mode 100644 index 922aa00..0000000 --- a/scripts/release-docker.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { $ } from 'bun'; - -const registry = 'ghcr.io/lone-cloud'; -const config = { name: 'sup-server', path: './server' }; - -try { - const packageJson = await Bun.file(`${config.path}/package.json`).json(); - const version = `v${packageJson.version}`; - - console.log(`Releasing ${config.name} ${version}...`); - - const fullName = `${registry}/${config.name}`; - - console.log(`\nBuilding ${config.name}...`); - await $`docker build -t ${fullName}:${version} -t ${fullName}:latest ${config.path}`; - console.log(`Built ${config.name}`); - - console.log(`Pushing ${fullName}:${version}...`); - await $`docker push ${fullName}:${version}`; - console.log(`Pushed ${fullName}:${version}`); - - console.log(`Pushing ${fullName}:latest...`); - await $`docker push ${fullName}:latest`; - console.log(`Pushed ${fullName}:latest`); - - console.log(` -✨ ${config.name} ${version} released successfully! - -Images pushed: - - ${fullName}:${version} - - ${fullName}:latest - -Users can now pull with: - docker compose pull -`); -} catch (error) { - console.error('Release failed:', error); - process.exit(1); -} diff --git a/scripts/release.ts b/scripts/release.ts new file mode 100644 index 0000000..f629e31 --- /dev/null +++ b/scripts/release.ts @@ -0,0 +1,41 @@ +import { $ } from 'bun'; + +try { + const packageJson = await Bun.file(`package.json`).json(); + const version = `v${packageJson.version}`; + + console.log(`Triggering release ${version} via CI...`); + + const existingTags = await $`git tag -l ${version}`.text(); + if (existingTags.trim()) { + console.error(`\n❌ Tag ${version} already exists!`); + console.log(`\nTo re-release, delete the tag first:`); + console.log(` git tag -d ${version}`); + console.log(` git push origin :refs/tags/${version}`); + process.exit(1); + } + + console.log(`\nCreating git tag ${version}...`); + await $`git tag -a ${version} -m "Release ${version}"`; + + console.log(`Pushing tag to trigger CI build...`); + await $`git push origin ${version}`; + + console.log(` +✨ Release ${version} triggered! + +GitHub Actions will now: + 1. Build Docker images + 2. Push to ghcr.io/lone-cloud/sup-server:${version} + 3. Push to ghcr.io/lone-cloud/sup-server:latest + +Watch the build: + https://github.com/lone-cloud/sup/actions + +Once complete, images will be available: + docker pull ghcr.io/lone-cloud/sup-server:${version} +`); +} catch (error) { + console.error('Release failed:', error); + process.exit(1); +}