Skip to content

AUR

AUR #17

Workflow file for this run

name: AUR
on: workflow_dispatch
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- name: Checkout project
id: checkout
uses: actions/checkout@v4
with:
path: ./repo
fetch-depth: 0
- name: Prepare artifacts
run: |
LATEST_VERSION=$(cd ./repo; git tag --sort=version:refname | tail -n1 | tr -d 'v' | tr -d '\n')
echo "LATEST_VERSION: $LATEST_VERSION"
wget -q "https://github.com/Figma-Linux/figma-linux/releases/download/v${LATEST_VERSION}/figma-linux_${LATEST_VERSION}_linux_amd64.zip"
wget -q "https://github.com/Figma-Linux/figma-linux/releases/download/v${LATEST_VERSION}/figma-linux_${LATEST_VERSION}_linux_arm64.zip"
mkdir -p ./repo/build/installers
mv ./figma-linux_*.zip ./repo/build/installers/
- name: Import SSH key
id: key
run: |
echo "Importing SSH ley..."
mkdir ~/.ssh
echo "${{ secrets.ID_RSA }}" | base64 -d > ~/.ssh/id_rsa
echo "Updating ~/.ssh/known_hosts..."
ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
echo "Step completed"
- name: Checkout AUR repo
id: checkoutAur
run: git clone https://aur.archlinux.org/figma-linux.git ./aur
- name: Update PKGBUILD
id: pkgbuild
run: |
mkdir new-aur
ls -la .
cd ./repo
docker build -t 4tqrgqe5yrgfd/figma-linux-docker-image-archlinux -f ./docker/archlinux .
docker cp $(docker create 4tqrgqe5yrgfd/figma-linux-docker-image-archlinux)://usr/src/figma-linux-aur/. ../new-aur
# cp -rf ../new-aur/PKGBUILD ../aur/
# cp -rf ../new-aur/.SRCINFO ../aur/
echo ::set-output name=release::$version
cat ../new-aur/PKGBUILD
cat ../new-aur/.SRCINFO
# - name: Push to AUR
# id: push
# run: |
# git config --global --add user.name "${{ secrets.USER_NAME }}"
# git config --global --add user.email "${{ secrets.EMAIL }}"
# git add .
# git commit -m "Release v$version"
# git push origin master