-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da90190
commit e1d2cfb
Showing
5 changed files
with
82 additions
and
48 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
name: Debug | ||
|
||
on: | ||
push: | ||
branches: ['*'] | ||
# push: | ||
# branches: ['*'] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
@@ -13,32 +13,7 @@ jobs: | |
steps: | ||
- name: Install base-devel | ||
run: | | ||
pacman -Syu --noconfirm base-devel wget bc git openssh | ||
# - run: mkdir -p /github/home/.ssh | ||
# - run: ls -la /github/home/.ssh | ||
# - run: | | ||
# cat <<EOT >> /github/home/.ssh/config | ||
# Host * | ||
# StrictHostKeyChecking no | ||
# UserKnownHostsFile=/dev/null | ||
# EOT | ||
# - run: sudo chmod 400 /github/home/.ssh/config | ||
# - run: echo "${{ secrets.ID_ED25519 }}" > /github/home/.ssh/id_ed25519 | ||
# - run: echo "${{ secrets.ID_ED25519_PUB }}" > /github/home/.ssh/id_ed25519.pub | ||
# - run: chmod 600 /github/home/.ssh/id_ed25519 | ||
# - run: git config --global user.email "[email protected]" | ||
# - run: git config --global user.name "Daniel Gustaw" | ||
# - run: git init | ||
# - run: ls -la /github/home/.ssh | ||
# - run: whoami | ||
# - run: ls -la / | ||
# - run: ls -la /__w | ||
# - run: git config --global --add safe.directory /__w/gpt-cli/gpt-cli | ||
# - run: git remote add aur ssh://[email protected]/gpt-cli.git | ||
## - run: git config --unset-all http.https://github.com/.extraheader | ||
# - run: GIT_SSH_COMMAND="ssh -i /github/home/.ssh/id_ed25519" git fetch aur master | ||
# - run: la -la | ||
pacman -Syu --noconfirm base-devel wget bc | ||
- name: Setup environment | ||
run: | | ||
|
@@ -88,17 +63,13 @@ jobs: | |
cat PKGBUILD | ||
cat .SRCINFO | ||
# - run: git add PKGBUILD .SRCINFO | ||
# - run: git commit -m "Release ${{ env.PKGVER }}-${{ env.PKGREL }}" | ||
# - run: GIT_SSH_COMMAND="ssh -i /github/home/.ssh/id_ed25519" git push aur HEAD:master | ||
|
||
- name: Publish AUR package | ||
uses: KSXGitHub/[email protected] | ||
with: | ||
pkgname: gpt-cli | ||
pkgbuild: ./PKGBUILD | ||
commit_username: gustawdaniel | ||
commit_email: [email protected] | ||
ssh_private_key: ${{ secrets.ID_ED25519 }} | ||
commit_message: Release ${{ env.PKGVER }}-${{ env.PKGREL }} | ||
ssh_keyscan_types: ed25519 | ||
# - name: Publish AUR package | ||
# uses: KSXGitHub/[email protected] | ||
# with: | ||
# pkgname: gpt-cli | ||
# pkgbuild: ./PKGBUILD | ||
# commit_username: gustawdaniel | ||
# commit_email: [email protected] | ||
# ssh_private_key: ${{ secrets.ID_ED25519 }} | ||
# commit_message: Release ${{ env.PKGVER }}-${{ env.PKGREL }} | ||
# ssh_keyscan_types: ed25519 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,17 +36,80 @@ jobs: | |
push: origin HEAD:main | ||
|
||
aur: | ||
runs-on: archlinux | ||
needs: gnu-bash | ||
runs-on: ubuntu-latest | ||
container: | ||
image: archlinux:latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Install base-devel | ||
run: | | ||
pacman -Syu --noconfirm base-devel wget bc | ||
- name: Get release information | ||
run: | | ||
RELEASE_TAG=${{ github.event.release.tag_name }} | ||
RELEASE_TAG=$(echo ${{ github.event.release.tag_name }} | sed "s|v||") | ||
echo "Release tag: $RELEASE_TAG" | ||
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV | ||
- name: Use release information | ||
run: | | ||
echo "Using release tag: $RELEASE_TAG" | ||
- name: Setup environment | ||
run: | | ||
echo "PKGVER=${{ env.RELEASE_TAG }}" >> $GITHUB_ENV | ||
echo "PKGREL=$(echo "1+$(curl "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=gpt-cli" | head -n 3 | tail -n 1 | cut -d "=" -f 2)" | bc)" >> $GITHUB_ENV | ||
- run: echo ${{ env.PKGVER }} | ||
- name: Setup environment2 | ||
run: | | ||
wget "https://github.com/gustawdaniel/gpt-cli/releases/download/v${{ env.PKGVER }}/gpt-cli.gnu" -O gpt-cli.gnu | ||
echo "CHECKSUM=$(sha512sum gpt-cli.gnu | cut -d " " -f 1)" >> $GITHUB_ENV | ||
- name: Prepare PKGBUILD | ||
run: | | ||
cat <<EOT >> PKGBUILD | ||
pkgname=gpt-cli | ||
pkgver=${{ env.PKGVER }} | ||
pkgrel=${{ env.PKGREL }} | ||
pkgdesc="Run linux commands with natural language. Eg 'show my graphic card' instead 'lspci | grep VGA'" | ||
arch=('x86_64') | ||
url="https://github.com/gustawdaniel/gpt-cli" | ||
license=('MIT') | ||
depends=('xorg-server-devel' 'libxcb') | ||
options=() | ||
source_x86_64=("https://github.com/gustawdaniel/gpt-cli/releases/download/v${{ env.PKGVER }}/gpt-cli.gnu") | ||
sha512sums_x86_64=('${{ env.CHECKSUM }}') | ||
package() { | ||
# Install the binary | ||
install -Dm755 "\$srcdir/gpt-cli" "\$pkgdir/usr/bin/gpt-cli" | ||
# Create a symbolic link | ||
ln -s "/usr/bin/gpt-cli" "\$pkgdir/usr/bin/p" | ||
} | ||
EOT | ||
- name: Generate .SRCINFO | ||
run: | | ||
useradd -m builduser | ||
passwd -d builduser | ||
echo "builduser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/builduser | ||
chown -R builduser:builduser . | ||
sudo -u builduser bash -c "makepkg --printsrcinfo > .SRCINFO" | ||
- name: Show files | ||
run: | | ||
ls -la | ||
cat PKGBUILD | ||
cat .SRCINFO | ||
- name: Publish AUR package | ||
uses: KSXGitHub/[email protected] | ||
with: | ||
pkgname: gpt-cli | ||
pkgbuild: ./PKGBUILD | ||
commit_username: gustawdaniel | ||
commit_email: [email protected] | ||
ssh_private_key: ${{ secrets.ID_ED25519 }} | ||
commit_message: Release ${{ env.PKGVER }}-${{ env.PKGREL }} | ||
ssh_keyscan_types: ed25519 | ||
|
||
musl-docker: | ||
runs-on: ubuntu-latest | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "gpt-cli" | ||
version = "0.0.14" | ||
version = "0.0.15" | ||
edition = "2021" | ||
authors = ["Daniel Gustaw <[email protected]>"] | ||
license = "MIT" | ||
|