Compare commits

..

2 Commits

Author SHA1 Message Date
Brieuc Dubois 2de3daed2c PKGBUILD in ci
Build releases / build-docker (./backend, focus-backend) (push) Has been cancelled Details
Build releases / build-docker (./frontend, ./frontend/Dockerfile, focus-frontend) (push) Has been cancelled Details
Build releases / build-tauri (push) Has been cancelled Details
Build releases / build-docker (., focu) (push) Has been cancelled Details
Build releases / build-server (push) Has been cancelled Details
2024-01-14 13:49:03 +01:00
Brieuc Dubois dc08dc03a4 PKGBUILD for server 2024-01-14 02:33:46 +01:00
6 changed files with 196 additions and 90 deletions

View File

@ -107,6 +107,81 @@ jobs:
name: Focus ${{ steps.tagName.outputs.tag }}
prerelease: true
files: |-
frontend/src-tauri/target/release/focus
frontend/src-tauri/target/release/focus-desktop
frontend/src-tauri/target/release/bundle/deb/*.deb
frontend/src-tauri/target/release/bundle/appimage/*.AppImage
- name: Generate sha256sum
run: |
mkdir -p ./ci/pkgbuild/desktop-bin
sha256 frontend/src-tauri/target/release/bundle/deb/*.deb > ./ci/pkgbuild/desktop-bin/sha256sum
- name: Generate PKGBUILD
env:
RELEASE_TAG: ${{ steps.tagName.outputs.tag }}
run: ./ci/generate-pkgbuild-desktop.py
- name: Publish AUR package
uses: KSXGitHub/github-actions-deploy-aur@v2.7.0
with:
pkgname: focus-desktop-bin
pkgbuild: ./ci/pkgbuild/desktop-bin/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_KEY }}
commit_message: Update focus-desktop-bin to ${{ steps.tagName.outputs.tag }}
build-server:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
env:
RUNNER_TOOL_CACHE: /toolcache
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract tag
uses: olegtarasov/get-tag@v2.1.2
id: tagName
with:
tagRegex: "v(.*)"
- name: Set up go
uses: actions/setup-go@v3
with:
go-version: 1.21.5
- name: Build server
run: |
cd backend
go build -o focus-server .
cd ..
- name: Publish server
uses: akkuman/gitea-release-action@v1
with:
name: Focus ${{ steps.tagName.outputs.tag }}
prerelease: true
files: |-
backend/focus-server
- name: Generate sha256sum
run: |
mkdir -p ./ci/pkgbuild/server-bin
sha256 backend/focus-server > ./ci/pkgbuild/server-bin/sha256sum
- name: Generate PKGBUILD
env:
RELEASE_TAG: ${{ steps.tagName.outputs.tag }}
run: ./ci/generate-pkgbuild-server.py
- name: Publish AUR package
uses: KSXGitHub/github-actions-deploy-aur@v2.7.0
with:
pkgname: focus-server-bin
pkgbuild: ./ci/pkgbuild/server-bin/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_KEY }}
commit_message: Update focus-server-bin to ${{ steps.tagName.outputs.tag }}

View File

@ -1,39 +0,0 @@
# Maintainer: Brieuc Dubois <focus dot aur at bhasher dot com>
pkgname=focus-server-git
pkgver=r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
pkgrel=1
pkgdesc="Focus is an open-source, Kanban-style project management tool, emphasizing simplicity and efficiency."
arch=('x86_64')
license=('MIT')
provides=("${pkgname%-git}=${pkgver}")
conflicts=("${pkgname%-git}")
url="https://git.bhasher.com/bhasher/focus"
source=(
"$pkgname::git+https://git.bhasher.com/bhasher/focus.git"
"LICENSE::https://git.bhasher.com/Bhasher/focus/raw/branch/master/LICENSE.md"
)
md5sums=(
'SKIP'
'SKIP'
)
depends=(
'glibc'
)
makedepends=(
'go'
'git'
)
build() {
cd "$srcdir/$pkgname/backend"
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o focus-server .
}
package() {
install -Dm755 "${srcdir}/${pkgname}/backend/focus-server" "${pkgdir}/usr/bin/focus-server"
install -Dm644 "${srcdir}/${pkgname}/backend/focus-server.service" "${pkgdir}/usr/lib/systemd/system/focus-server.service"
install -Dm644 "${srcdir}/${pkgname}/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

View File

@ -0,0 +1,68 @@
#! /usr/bin/env python3
from os import environ
release_tag = environ.get('RELEASE_TAG')
if not release_tag:
print('::error ::RELEASE_TAG not set')
exit(1)
# TODO
with open('./ci/pkgbuild/desktop-bin/sha256sum', 'r') as f:
sha256sum = f.read().strip()
if not sha256sum:
print('::error ::sha256sum not set')
exit(1)
pkgbuild = f'''\
# Maintainer: Brieuc Dubois <focus dot aur at bhasher dot com>
pkgname=focus-desktop-bin
pkgver={release_tag}
pkgrel=1
pkgdesc="Focus is an open-source, Kanban-style project management tool, emphasizing simplicity and efficiency."
arch=('x86_64')
url="https://git.bhasher.com/bhasher/focus"
license=('MIT')
provides=("${{pkgname%-bin}}=${{pkgver}}")
conflicts=("${{pkgname%-bin}}")
depends=(
'webkit2gtk'
'gtk3'
'cairo'
'glib2'
'hicolor-icon-theme'
'gdk-pixbuf2'
'libsoup'
'gcc-libs'
'glibc'
'pango'
)
source=(
"focus-desktop_${{pkgver}}_amd64.deb::https://git.bhasher.com/Bhasher/focus/releases/download/v${{pkgver}}/focus-desktop_${{pkgver}}_amd64.deb"
"LICENSE::https://git.bhasher.com/Bhasher/focus/raw/branch/master/LICENSE.md"
)
sha256sums=(
'{sha256sum}'
'SKIP'
)
build() {{
bsdtar -xf "${{srcdir}}/data.tar.gz"
}}
package() {{
install -Dm755 "${{srcdir}}/usr/bin/focus-desktop" "${{pkgdir}}/usr/bin/focus-desktop"
install -Dm644 "${{srcdir}}/usr/share/applications/focus-desktop.desktop" "${{pkgdir}}/usr/share/applications/focus-desktop.desktop"
for _icons in 32x32 128x128 256x256@2;do
install -Dm644 "${{srcdir}}/usr/share/icons/hicolor/${{_icons}}/apps/focus-desktop.png" \
-t "${{pkgdir}}/usr/share/icons/hicolor/${{_icons//@2/}}/apps/focus-desktop.png"
done
install -Dm644 "${{srcdir}}/LICENSE" "${{pkgdir}}/usr/share/licenses/${{pkgname}}/LICENSE"
}}
'''
with open('./ci/pkgbuild/desktop-bin/PKGBUILD', 'w') as f:
f.write(pkgbuild)

View File

@ -0,0 +1,50 @@
#! /usr/bin/env python3
from os import environ
release_tag = environ.get('RELEASE_TAG')
if not release_tag:
print('::error ::RELEASE_TAG not set')
exit(1)
# TODO
with open('./ci/pkgbuild/server-bin/sha256sum', 'r') as f:
sha256sum = f.read().strip()
if not sha256sum:
print('::error ::sha256sum not set')
exit(1)
pkgbuild = f'''\
# Maintainer: Brieuc Dubois <focus dot aur at bhasher dot com>
pkgname=focus-server-bin
pkgver={release_tag}
pkgrel=1
pkgdesc="Focus is an open-source, Kanban-style project management tool, emphasizing simplicity and efficiency."
arch=('x86_64')
url="https://git.bhasher.com/bhasher/focus"
license=('MIT')
provides=("${{pkgname%-bin}}=${{pkgver}}")
conflicts=("${{pkgname%-bin}}")
depends=(
'glibc'
)
source=(
"focus-server::https://git.bhasher.com/Bhasher/focus/releases/download/v${{pkgver}}/focus-server"
"LICENSE::https://git.bhasher.com/Bhasher/focus/raw/branch/master/LICENSE.md"
)
sha256sums=(
'{sha256sum}'
'SKIP'
)
package() {{
install -Dm755 "${{srcdir}}/focus-server" "${{pkgdir}}/usr/bin/focus-server"
install -Dm644 "${{srcdir}}/LICENSE" "${{pkgdir}}/usr/share/licenses/${{pkgname}}/LICENSE"
}}
'''
with open('./ci/pkgbuild/server-bin/PKGBUILD', 'w') as f:
f.write(pkgbuild)

View File

@ -1,48 +0,0 @@
# Maintainer: Brieuc Dubois <focus dot aur at bhasher dot com>
pkgname=focus-desktop-bin
pkgver=0.3.2
pkgrel=1
pkgdesc="Focus is an open-source, Kanban-style project management tool, emphasizing simplicity and efficiency."
arch=('x86_64')
license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
url="https://git.bhasher.com/bhasher/focus"
depends=(
'webkit2gtk'
'gtk3'
'cairo'
'glib2'
'hicolor-icon-theme'
'gdk-pixbuf2'
'libsoup'
'gcc-libs'
'glibc'
'pango'
)
source=(
"https://git.bhasher.com/Bhasher/focus/releases/download/v${pkgver}/focus_${pkgver}_amd64.deb"
"LICENSE-${pkgver}::https://git.bhasher.com/Bhasher/focus/raw/branch/master/LICENSE.md"
)
sha256sums=(
'64dc3fbd2476ef5ff9b0705c6ec287657ef7ce96c4b72d063088eb05c519f227'
'00f70f9c4cb1c351877b690002c21564dc022f7b5d7fd1273ff52c5911356384'
)
build() {
bsdtar -xf "${srcdir}/data.tar.gz"
}
package() {
install -Dm755 "${srcdir}/usr/bin/focus" "${pkgdir}/usr/bin/focus"
install -Dm644 "${srcdir}/usr/share/applications/focus.desktop" "${pkgdir}/usr/share/applications"
for _icons in 32x32 128x128 256x256@2;do
install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/focus.png" \
-t "${pkgdir}/usr/share/icons/hicolor/${_icons//@2/}/apps"
done
install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

View File

@ -8,8 +8,8 @@
"withGlobalTauri": true
},
"package": {
"productName": "Focus",
"version": "0.3.2"
"productName": "Focus-Desktop",
"version": "0.3.3"
},
"tauri": {
"allowlist": {