v0.1.2 #25
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}" |