Skip to content

Commit

Permalink
feat: add dummy script for AUR workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmuente committed Sep 13, 2021
1 parent 43e827c commit 96f661b
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/release.yml
Expand Up @@ -23,4 +23,21 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUSTTARGET: ${{ matrix.target }}
ARCHIVE_TYPES: ${{ matrix.archive }}
ARCHIVE_TYPES: ${{ matrix.archive }}

release-aur:
needs: release
runs-on: ubuntu-latest
steps:
- name: Get release
id: get_release
uses: bruceadams/get-release@v1.2.3
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Release AUR
uses: actions/checkout@master
env:
${{ steps.get_release.outputs }}
run: python ci/generate-pkgbuild.py


29 changes: 29 additions & 0 deletions ci/github-actions/generate-pkgbuild.py
@@ -0,0 +1,29 @@
#!/usr/bin/env python3

import os

template = """
#Maintainer: Josh Münte
_pkgname='knockson'
pkgname="${_pkgname}-bin"
pkgver=0.5.0
pkgrel=1
pkgdesc='simple multi-threaded port scanner written in rust'
arch=('x86_64')
url='https://github.com/joshmuente/knockson'
_url_source='https://github.com/joshmuente/knockson'
license=('MIT')
depends=()
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("${_url_source}/releases/download/v${pkgver}/${_pkgname}_v${pkgver}_${arch}-unknown-linux-musl.tar.xz")
sha256sums=('165f65f6943fa5280fcecde2390f1d8f8bea6233458ea2548831b49548ddb0d7')
package () {
install -Dm 775 "${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
}
"""

print(template)
print(os.environ)

0 comments on commit 96f661b

Please sign in to comment.