AUR #11
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
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: | | |
sudo apt update | |
sudo apt install libarchive-dev libarchive-tools | |
ls -la . | |
LATEST_VERSION=$(cd ./repo; git tag --sort=version:refname | tail -n1 | tr -d 'v' | tr -d '\n') | |
echo "LATEST_VERSION: $LATEST_VERSION" | |
wget "https://github.com/Figma-Linux/figma-linux/releases/download/v${LATEST_VERSION}/figma-linux_${LATEST_VERSION}_linux_amd64.zip" | |
wget "https://github.com/Figma-Linux/figma-linux/releases/download/v${LATEST_VERSION}/figma-linux_${LATEST_VERSION}_linux_arm64.zip" | |
ls -la . | |
git clone git://projects.archlinux.org/pacman.git | |
cd pacman | |
./autogen.sh | |
./configure --disable-doc | |
make | |
sudo make install | |
ls -la . | |
whereis pacman | |
whereis makepkg | |
- name: Import SSH key | |
id: key | |
run: | | |
echo "Importing SSH ley..." | |
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 ssh://aur@aur.archlinux.org/figma-linux.git ./ | |
- name: Update PKGBUILD | |
id: pkgbuild | |
run: | | |
mkdir new-aur | |
cd ./src | |
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 |