Release PostPilot #26
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/cosign-installer@v3.3.0 | |
- 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/cosign-installer@v3.3.0 | |
- 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: | | |
# Remove 'v' prefix from version number for pkgver | |
VERSION="${{ github.ref_name }}" | |
VERSION_NO_V="${VERSION#v}" | |
echo "Building package for version: $VERSION_NO_V" | |
cat > PKGBUILD << EOF | |
# Maintainer: Watzon <cawatson1993@gmail.com> | |
pkgname=postpilot-bin | |
pkgver=${VERSION_NO_V} | |
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/${VERSION}/postpilot_\${pkgver}_linux_amd64.pkg.tar.zst") | |
source_aarch64=("\${pkgname}-\${pkgver}-aarch64.pkg.tar.zst::https://github.com/watzon/postpilot/releases/download/${VERSION}/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/github-actions-deploy-aur@v3.0.1 | |
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}" |