Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cea84de242 | |||
| ad1ec9c2e3 | |||
| fa3b5592da | |||
| 722d687afe |
@@ -27,3 +27,71 @@ jobs:
|
|||||||
files: |-
|
files: |-
|
||||||
kewt
|
kewt
|
||||||
api_key: '${{secrets.GITEA_TOKEN}}'
|
api_key: '${{secrets.GITEA_TOKEN}}'
|
||||||
|
|
||||||
|
- name: Push to GitHub Release
|
||||||
|
run: |
|
||||||
|
TAG="${GITHUB_REF#refs/tags/}"
|
||||||
|
|
||||||
|
# Create the release on GitHub
|
||||||
|
curl -sL -X POST \
|
||||||
|
-H "Authorization: token ${{ secrets.GH_RELEASE_TOKEN }}" \
|
||||||
|
-H "Accept: application/vnd.github+json" \
|
||||||
|
"https://api.github.com/repos/n0va-bot/kewt/releases" \
|
||||||
|
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"draft\":false,\"prerelease\":false}" || true
|
||||||
|
|
||||||
|
# Get the release ID
|
||||||
|
RELEASE_ID=$(curl -sL \
|
||||||
|
-H "Authorization: token ${{ secrets.GH_RELEASE_TOKEN }}" \
|
||||||
|
-H "Accept: application/vnd.github+json" \
|
||||||
|
"https://api.github.com/repos/n0va-bot/kewt/releases/tags/${TAG}" | jq -r '.id')
|
||||||
|
|
||||||
|
# Upload the asset
|
||||||
|
curl -sL -X POST \
|
||||||
|
-H "Authorization: token ${{ secrets.GH_RELEASE_TOKEN }}" \
|
||||||
|
-H "Content-Type: application/octet-stream" \
|
||||||
|
"https://uploads.github.com/repos/n0va-bot/kewt/releases/${RELEASE_ID}/assets?name=kewt" \
|
||||||
|
--data-binary @kewt
|
||||||
|
|
||||||
|
publish-aur:
|
||||||
|
runs-on: local
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Arch Linux environment
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y pacman-package-manager curl jq || true
|
||||||
|
|
||||||
|
- name: Render PKGBUILD and SRCINFO
|
||||||
|
run: |
|
||||||
|
# Get latest release version
|
||||||
|
VERSION=${GITHUB_REF#refs/tags/v}
|
||||||
|
VERSION=${VERSION#refs/tags/}
|
||||||
|
|
||||||
|
# Download the asset
|
||||||
|
curl -sL -o kewt https://git.krzak.org/N0VA/kewt/releases/download/v${VERSION}/kewt
|
||||||
|
|
||||||
|
# Calculate checksum
|
||||||
|
CHECKSUM=$(sha256sum kewt | awk '{print $1}')
|
||||||
|
|
||||||
|
# Render PKGBUILD
|
||||||
|
mkdir -p aur-work
|
||||||
|
sed -e "s/VERSION_PLACEHOLDER/${VERSION}/g" \
|
||||||
|
-e "s/SHA256SUM_PLACEHOLDER/${CHECKSUM}/g" \
|
||||||
|
packaging/AUR/PKGBUILD.template > aur-work/PKGBUILD
|
||||||
|
|
||||||
|
# Generate .SRCINFO
|
||||||
|
cd aur-work
|
||||||
|
makepkg --printsrcinfo > .SRCINFO
|
||||||
|
|
||||||
|
- name: Publish to AUR
|
||||||
|
uses: KSXGitHub/github-actions-deploy-aur@v3.0.1
|
||||||
|
with:
|
||||||
|
pkgname: kewt-bin
|
||||||
|
pkgbuild: ./aur-work/PKGBUILD
|
||||||
|
commit_username: ${{ github.actor }}
|
||||||
|
commit_email: ${{ github.actor }}@users.noreply.github.com
|
||||||
|
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
||||||
|
commit_message: "Update kewt-bin to ${{ github.ref_name }}"
|
||||||
|
|||||||
16
.github/workflows/lint.yml
vendored
16
.github/workflows/lint.yml
vendored
@@ -1,16 +0,0 @@
|
|||||||
name: Lint
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main, master ]
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
shellcheck:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install Shellcheck
|
|
||||||
run: sudo apt-get update && sudo apt-get install -y shellcheck
|
|
||||||
- name: Run Shellcheck
|
|
||||||
run: shellcheck kewt.sh markdown.sh tools/build-standalone.sh || true
|
|
||||||
25
.github/workflows/release.yml
vendored
25
.github/workflows/release.yml
vendored
@@ -1,25 +0,0 @@
|
|||||||
name: Release Standalone Builder
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Build standalone executable
|
|
||||||
run: |
|
|
||||||
chmod +x tools/build-standalone.sh
|
|
||||||
./tools/build-standalone.sh
|
|
||||||
|
|
||||||
- name: Upload Release Asset
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
files: kewt
|
|
||||||
@@ -19,6 +19,15 @@ It's meant to be a static site generator, like _[kew](https://github.com/uint23/
|
|||||||
|
|
||||||
If you want to **force** a file to be inlined, use `\!![]` instead of `\![]`
|
If you want to **force** a file to be inlined, use `\!![]` instead of `\![]`
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
You can clone the repository to use `kewt.sh` directly, or you can download the standalone executable, which bundles all dependencies into a single file:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
curl -L -o kewt https://git.krzak.org/N0VA/kewt/releases/latest/download/kewt
|
||||||
|
chmod +x kewt
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|||||||
21
packaging/AUR/PKGBUILD.template
Normal file
21
packaging/AUR/PKGBUILD.template
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Maintainer: n0va <n0va@krzak.org>
|
||||||
|
pkgname=kewt-bin
|
||||||
|
pkgver=VERSION_PLACEHOLDER
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="A minimalist, 100% POSIX static site generator inspired by werc and kew"
|
||||||
|
arch=('any')
|
||||||
|
url="https://git.krzak.org/N0VA/kewt"
|
||||||
|
license=('MIT')
|
||||||
|
depends=('sh')
|
||||||
|
provides=('kewt')
|
||||||
|
conflicts=('kewt' 'kewt-git')
|
||||||
|
source=("${pkgname}-${pkgver}.sh::${url}/releases/download/v${pkgver}/kewt")
|
||||||
|
sha256sums=('SHA256SUM_PLACEHOLDER')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
chmod +x "${srcdir}/${pkgname}-${pkgver}.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -Dm755 "${srcdir}/${pkgname}-${pkgver}.sh" "${pkgdir}/usr/bin/kewt"
|
||||||
|
}
|
||||||
@@ -19,6 +19,15 @@ It's meant to be a static site generator, like _[kew](https://github.com/uint23/
|
|||||||
|
|
||||||
If you want to **force** a file to be inlined, use `\!![]` instead of `\![]`
|
If you want to **force** a file to be inlined, use `\!![]` instead of `\![]`
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
You can clone the repository to use `kewt.sh` directly, or you can download the standalone executable, which bundles all dependencies into a single file:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
curl -L -o kewt https://git.krzak.org/N0VA/kewt/releases/latest/download/kewt
|
||||||
|
chmod +x kewt
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|||||||
Reference in New Issue
Block a user