diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 574c57f..a82f9ce 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -85,6 +85,13 @@ jobs: VERSION="${{ github.event.inputs.tag || github.ref_name }}" makensis -DVERSION="${VERSION#v}" -DEXE="$PWD/relspec-windows-amd64.exe" -DOUT="$PWD/relspec-setup-windows-amd64.exe" windows/installer.nsi + - name: Build source archives + run: | + TAG="${{ github.event.inputs.tag || github.ref_name }}" + PREFIX="relspec-${TAG#v}" + git archive --format=tar.gz --prefix="${PREFIX}/" -o "relspec-${TAG}-source.tar.gz" "$TAG" + git archive --format=zip --prefix="${PREFIX}/" -o "relspec-${TAG}-source.zip" "$TAG" + - name: Create release and upload assets run: | TAG="${{ github.event.inputs.tag || github.ref_name }}" @@ -198,7 +205,7 @@ jobs: echo "Publishing AUR package version ${PKGVER}-${PKGREL}" # Compute SHA256 of the source archive from the same URL the PKGBUILD will download. - SHA=$(curl -fsSL "https://git.warky.dev/wdevs/relspecgo/archive/v${PKGVER}.zip" | sha256sum | cut -d' ' -f1) + SHA=$(curl -fsSL "https://git.warky.dev/wdevs/relspecgo/releases/download/v${PKGVER}/relspec-v${PKGVER}-source.zip" | sha256sum | cut -d' ' -f1) # Update PKGBUILD — keep remote source URL, bump version/checksum, and increment pkgrel for same-version rebuilds. sed -e "s/^pkgver=.*/pkgver=${PKGVER}/" \ diff --git a/linux/arch/PKGBUILD b/linux/arch/PKGBUILD index d28da12..3afbe4d 100644 --- a/linux/arch/PKGBUILD +++ b/linux/arch/PKGBUILD @@ -7,11 +7,11 @@ arch=('x86_64' 'aarch64') url="https://git.warky.dev/wdevs/relspecgo" license=('MIT') makedepends=('go') -source=("$pkgname-$pkgver.zip::$url/archive/v$pkgver.zip") +source=("$pkgname-$pkgver.zip::$url/releases/download/v$pkgver/relspec-v$pkgver-source.zip") sha256sums=('SKIP') build() { - cd "relspecgo" + cd "$pkgname-$pkgver" export CGO_ENABLED=0 go build \ -trimpath \ @@ -20,12 +20,12 @@ build() { } check() { - cd "relspecgo" + cd "$pkgname-$pkgver" go test ./... } package() { - cd "relspecgo" + cd "$pkgname-$pkgver" # Binary install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"