Skip to content

Commit

Permalink
add arch linux binary support
Browse files Browse the repository at this point in the history
  • Loading branch information
0-don committed Dec 6, 2023
1 parent bce199a commit b70b90f
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 4 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:

runs-on: ${{ matrix.platform }}
steps:

- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
Expand All @@ -64,14 +65,63 @@ jobs:
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb
sudo apt-get install -y openssl libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libxcb-shape0-dev libxcb-xfixes0-dev libxdo-dev
- name: install frontend dependencies
run: yarn install

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
releaseId: ${{ needs.create-release.outputs.release_id }}

- name: create .env file
if: matrix.platform == 'ubuntu-latest'
run: |
PACKAGE_NAME=$(node -p "require('./package.json').name")
PACKAGE_VERSION=$(node -p "require('./package.json').version")
FILE_NAME=$PACKAGE_NAME_$PACKAGE_VERSION.tar.zst
BINARY_PATH=./src-tauri/target/release/$PACKAGE_NAME
echo "PACKAGE_NAME=$PACKAGE_NAME" >> $GITHUB_ENV
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
echo "FILE_NAME=$FILE_NAME" >> $GITHUB_ENV
echo "BINARY_PATH=$BINARY_PATH" >> $GITHUB_ENV
- name: Create PKGBUILD
if: matrix.platform == 'ubuntu-latest'
run: |
cat <<EOF > PKGBUILD
pkgname=${{ env.PACKAGE_NAME }}
pkgver=${{ env.PACKAGE_VERSION }}
pkgrel=1
pkgdesc="Your package description"
arch=('x86_64')
license=('GPL')
source=("${{ env.BINARY_PATH }}")
sha256sums=('SKIP')
package() {
install -Dm755 "\$srcdir/$(basename ${{ env.BINARY_PATH }})" "\$pkgdir/usr/bin/${{ env.PACKAGE_NAME }}"
}
EOF

- name: Build Arch Package
if: matrix.platform == 'ubuntu-latest'
run: |
makepkg --printsrcinfo > .SRCINFO
makepkg -fc
- name: Upload Arch Package to Release
if: matrix.platform == 'ubuntu-latest'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./${{ env.PACKAGE_NAME }}-${{ env.PACKAGE_VERSION }}-1-x86_64.pkg.tar.zst
asset_name: ${{ env.PACKAGE_NAME }}-${{ env.PACKAGE_VERSION }}-1-x86_64.pkg.tar.zst
tag: ${{ github.ref }}
overwrite: true

publish-release:
permissions:
contents: write
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clippy",
"version": "1.2.0",
"version": "1.2.1",
"private": true,
"scripts": {
"start": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/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 src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clippy"
version = "1.2.0"
version = "1.2.1"
description = "Clipboard Manager built with Rust & Typescript"
authors = ["Don-Cryptus"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "clippy",
"version": "1.2.0"
"version": "1.2.1"
},
"tauri": {
"allowlist": {
Expand Down

0 comments on commit b70b90f

Please sign in to comment.