Skip to content

Commit

Permalink
get started on smtp
Browse files Browse the repository at this point in the history
pre-release?

version update

version update

Initial release (squashed)

make frontend

fix stuff

release with aur

separate goreleaser configs

fix configs

fix configs

hopefully fix aur build issues

version

Revert "hopefully fix aur build issues"

This reverts commit 6a01f9d.

version

hopefully fix aur build issues
  • Loading branch information
watzon committed Nov 11, 2024
1 parent 79eeb63 commit a179c7f
Show file tree
Hide file tree
Showing 50 changed files with 1,971 additions and 300 deletions.
Binary file modified .github/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
136 changes: 136 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: Release PostPilot

on:
release:
types: [published]

permissions:
contents: write
id-token: write

jobs:
release-amd64:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20.8.0'

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev
- name: Install Syft
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
- name: Install Cosign
uses: sigstore/[email protected]

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean --config .goreleaser.amd64.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COSIGN_EXPERIMENTAL: 1

release-arm64:
runs-on: buildjet-4vcpu-ubuntu-2204-arm
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20.8.0'

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev
- name: Install Syft
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
- name: Install Cosign
uses: sigstore/[email protected]

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean --config .goreleaser.arm64.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COSIGN_EXPERIMENTAL: 1

publish-aur:
needs: [release-amd64, release-arm64]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Generate PKGBUILD
run: |
echo "Building package for version: ${{ github.ref_name }}"
cat > PKGBUILD << EOF
# Maintainer: Watzon <[email protected]>
pkgname=postpilot-bin
pkgver=${{ github.ref_name }}
pkgrel=1
pkgdesc="Email and SMTP testing GUI for developers"
arch=('x86_64' 'aarch64')
url="https://github.com/watzon/postpilot"
license=('MIT')
depends=('gtk3' 'webkit2gtk')
provides=('postpilot')
conflicts=('postpilot')
source_x86_64=("\${pkgname}-\${pkgver}-x86_64.pkg.tar.zst::https://github.com/watzon/postpilot/releases/download/v\${pkgver}/postpilot_\${pkgver}_linux_amd64.pkg.tar.zst")
source_aarch64=("\${pkgname}-\${pkgver}-aarch64.pkg.tar.zst::https://github.com/watzon/postpilot/releases/download/v\${pkgver}/postpilot_\${pkgver}_linux_arm64.pkg.tar.zst")
sha256sums_x86_64=('SKIP')
sha256sums_aarch64=('SKIP')
package() {
cd "\$srcdir"
cp -r usr/ "\$pkgdir/"
}
EOF
- name: Publish AUR package
uses: KSXGitHub/[email protected]
with:
pkgname: postpilot-bin
pkgbuild: ./PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Update to version ${GITHUB_REF#refs/tags/v}"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
build/bin
node_modules
frontend/dist
dist/
bin/
137 changes: 137 additions & 0 deletions .goreleaser.amd64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
before:
hooks:
- make dep
- make bindings

builds:
- main: .
binary: "{{ .ProjectName }}"
goos:
- linux
- windows
goarch:
- amd64
env:
- CGO_ENABLED=1
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- -s -w -X main.Version={{.Version}} -X main.useWails=true
tags:
- desktop
- production
overrides:
- goos: windows
goarch: amd64
goamd64: v1
ldflags:
- -w
- -s
- -h
- -H windowsgui
- -X main.Version={{.Version}}
- -X main.useWails=true
tags:
- desktop
- production

archives:
- format: tar.gz
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- .Arch }}
files:
- usr/**/*
format_overrides:
- goos: windows
format: zip

checksum:
name_template: 'checksums-amd64.txt'

source:
enabled: false

sboms:
- artifacts: archive
- id: source
artifacts: source

signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
certificate: '${artifact}-amd64.pem'
signature: '${artifact}-amd64.sig'
args:
- sign-blob
- '--output-certificate=${certificate}'
- '--output-signature=${signature}'
- '${artifact}'
- "--yes"
artifacts: checksum
output: true

snapshot:
name_template: "{{ incpatch .Version }}-next"

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

nfpms:
- vendor: postpilot
license: MIT
homepage: https://postpilot.watzon.tech
maintainer: "Watzon <[email protected]>"
description: "Email and SMTP testing GUI for developers"
formats:
- deb
- rpm
- apk
- archlinux
bindir: /usr/local/bin
contents:
- src: ./build/linux/postpilot_0.0.0_ARCH/usr/share/applications/postpilot.desktop
dst: /usr/share/applications/postpilot.desktop
- src: ./build/linux/postpilot_0.0.0_ARCH/usr/share/icons/hicolor/512x512/apps/postpilot.png
dst: /usr/share/icons/hicolor/512x512/apps/postpilot.png
- src: ./build/linux/postpilot_0.0.0_ARCH/usr/share/metainfo/tech.watzon.postpilot.appdata.xml
dst: /usr/share/metainfo/tech.watzon.postpilot.appdata.xml
dependencies:
- gtk3
- webkit2gtk-4.0
- libayatana-appindicator3-1
- libwebkit2gtk-4.0-37
- libgtk-3-0
- xdg-utils
overrides:
rpm:
dependencies:
- gtk3
- webkit2gtk4.0
- libappindicator-gtk3
- webkit2gtk3
apk:
dependencies:
- gtk+3.0
- webkit2gtk
- libappindicator
archlinux:
dependencies:
- gtk3
- webkit2gtk
- libappindicator-gtk3
rpm:
packager: "Watzon <[email protected]>"
deb:
fields:
Maintainer: "Watzon <[email protected]>"
Bugs: https://github.com/watzon/postpilot/issues
archlinux:
packager: "Watzon <[email protected]>"
Loading

0 comments on commit a179c7f

Please sign in to comment.