Skip to content

Commit

Permalink
release 0.0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
gustawdaniel committed Mar 19, 2023
1 parent da90190 commit e1d2cfb
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 48 deletions.
55 changes: 13 additions & 42 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Debug

on:
push:
branches: ['*']
# push:
# branches: ['*']
workflow_dispatch:

jobs:
Expand All @@ -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: |
Expand Down Expand Up @@ -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
69 changes: 66 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test
on:
push:
branches-ignore:
- 'main' # Exclude main branch if needed
- '' # Exclude main branch if needed
tags-ignore:
- '' # Exclude annotated tags if needed
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
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"
Expand Down

0 comments on commit e1d2cfb

Please sign in to comment.