@@ -197,75 +197,75 @@ jobs:
197197 # run: |
198198 # ./scripts/build_ppa.sh "1"
199199
200- upload_aur :
201- name : Upload to AUR
202- runs-on : ubuntu-latest
203- needs : [release_amd64, release_arm64v8]
204- steps :
205- - uses : actions/download-artifact@v2
206- with :
207- path : ./
208-
209- - name : Prepare artifacts
210- run : |
211- ls -la .
212- mkdir -p src/build/installers
213- mv ./repo/* ./src
214- mv ./amd64/build/installers/* ./src/build/installers/
215- mv ./arm64v8/* ./src/build/installers/
216- rm -rf ./repo
217- rm -rf ./amd64
218- rm -rf ./arm64v8
219- ls -la .
220- ls -la ./src
221- ls -la ./src/build
222- ls -la ./src/build/installers
223- find ./ -type f -iname "*.sh" -exec chmod +x {} \;
224- find ./ -type f -iname "*.pl" -exec chmod +x {} \;
225- rm -rf ./src/build/installers/*.deb
226- rm -rf ./src/build/installers/*.pacman
227- rm -rf ./src/build/installers/*.rpm
228- rm -rf ./src/build/installers/*.AppImage
229- rm -rf ./src/build/installers/linux*
230- ls -la ./src/build/installers/
231-
232- - name : Import SSH key
233- id : key
234- run : |
235- echo "Importing SSH ley..."
236- mkdir ~/.ssh
237- echo "${{ secrets.ID_RSA }}" | base64 -d > ~/.ssh/id_rsa
238- echo "Updating ~/.ssh/known_hosts..."
239- ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
240- chmod 700 ~/.ssh
241- chmod 600 ~/.ssh/id_rsa
242- echo "Step completed"
243-
244- - name : Checkout AUR repo
245- id : checkout
246- run : git clone ssh://aur@aur.archlinux.org/figma-linux.git ./aur
247-
248- - name : Update PKGBUILD
249- id : pkgbuild
250- run : |
251- mkdir new-aur
252- cd ./src
253- docker build -t 4tqrgqe5yrgfd/figma-linux-docker-image-archlinux -f ./docker/archlinux .
254- docker cp $(docker create 4tqrgqe5yrgfd/figma-linux-docker-image-archlinux)://usr/src/figma-linux-aur/. ../new-aur
255- cp -rf ../new-aur/PKGBUILD ../aur/
256- cp -rf ../new-aur/.SRCINFO ../aur/
257- echo ::set-output name=release::$version
200+ # upload_aur:
201+ # name: Upload to AUR
202+ # runs-on: ubuntu-latest
203+ # needs: [release_amd64, release_arm64v8]
204+ # steps:
205+ # - uses: actions/download-artifact@v2
206+ # with:
207+ # path: ./
258208
259- - name : Push to AUR
260- id : push
261- run : |
262- git config --global --add user.name "${{ secrets.USER_NAME }}"
263- git config --global --add user.email "${{ secrets.EMAIL }}"
264- cd ./aur
265- git status
266- git add .
267- git commit -m "Release v${{ steps.pkgbuild.outputs.release }}"
268- git push origin master
209+ # - name: Prepare artifacts
210+ # run: |
211+ # ls -la .
212+ # mkdir -p src/build/installers
213+ # mv ./repo/* ./src
214+ # mv ./amd64/build/installers/* ./src/build/installers/
215+ # mv ./arm64v8/* ./src/build/installers/
216+ # rm -rf ./repo
217+ # rm -rf ./amd64
218+ # rm -rf ./arm64v8
219+ # ls -la .
220+ # ls -la ./src
221+ # ls -la ./src/build
222+ # ls -la ./src/build/installers
223+ # find ./ -type f -iname "*.sh" -exec chmod +x {} \;
224+ # find ./ -type f -iname "*.pl" -exec chmod +x {} \;
225+ # rm -rf ./src/build/installers/*.deb
226+ # rm -rf ./src/build/installers/*.pacman
227+ # rm -rf ./src/build/installers/*.rpm
228+ # rm -rf ./src/build/installers/*.AppImage
229+ # rm -rf ./src/build/installers/linux*
230+ # ls -la ./src/build/installers/
231+
232+ # - name: Import SSH key
233+ # id: key
234+ # run: |
235+ # echo "Importing SSH ley..."
236+ # mkdir ~/.ssh
237+ # echo "${{ secrets.ID_RSA }}" | base64 -d > ~/.ssh/id_rsa
238+ # echo "Updating ~/.ssh/known_hosts..."
239+ # ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
240+ # chmod 700 ~/.ssh
241+ # chmod 600 ~/.ssh/id_rsa
242+ # echo "Step completed"
243+
244+ # - name: Checkout AUR repo
245+ # id: checkout
246+ # run: git clone ssh://aur@aur.archlinux.org/figma-linux.git ./aur
247+
248+ # - name: Update PKGBUILD
249+ # id: pkgbuild
250+ # run: |
251+ # mkdir new-aur
252+ # cd ./src
253+ # docker build -t 4tqrgqe5yrgfd/figma-linux-docker-image-archlinux -f ./docker/archlinux .
254+ # docker cp $(docker create 4tqrgqe5yrgfd/figma-linux-docker-image-archlinux)://usr/src/figma-linux-aur/. ../new-aur
255+ # cp -rf ../new-aur/PKGBUILD ../aur/
256+ # cp -rf ../new-aur/.SRCINFO ../aur/
257+ # echo ::set-output name=release::$version
258+
259+ # - name: Push to AUR
260+ # id: push
261+ # run: |
262+ # git config --global --add user.name "${{ secrets.USER_NAME }}"
263+ # git config --global --add user.email "${{ secrets.EMAIL }}"
264+ # cd ./aur
265+ # git status
266+ # git add .
267+ # git commit -m "Release v${{ steps.pkgbuild.outputs.release }}"
268+ # git push origin master
269269
270270 flatpak :
271271 name : Update Flatpak
@@ -327,15 +327,15 @@ jobs:
327327 prevVersion=$(cat ./flatpak-repo/io.github.Figma_Linux.figma_linux.appdata.xml | grep -Eo 'release\sversion=".*"\s' | tr -d '[a-z=" \s\n]')
328328 version="$(cat ./build/installers/version)"
329329 echo "Bump version from $prevVersion to $version"
330- sed -i "s/$prevVersion/$version/" ./flatpak-repo/io.github.Figma_Linux.figma_linux.appdata.xml
331- sed -i "s/$prevVersion/$version/" ./flatpak-repo/io.github.Figma_Linux.figma_linux.yml
330+ sed -i "s/$prevVersion/$version/g " ./flatpak-repo/io.github.Figma_Linux.figma_linux.appdata.xml
331+ sed -i "s/$prevVersion/$version/g " ./flatpak-repo/io.github.Figma_Linux.figma_linux.yml
332332 echo "Updating sums..."
333- export sha256sums_x86_64="$(sha256sum ./build/installers/figma-linux_${version}_linux_amd64.deb)"
334- export sha256sums_aarch64="$(sha256sum ./build/installers/figma-linux_${version}_linux_arm64.deb)"
333+ export sha256sums_x86_64="$(sha256sum ./build/installers/figma-linux_${version}_linux_amd64.deb | awk '{print $1}' | tr -d '\n' )"
334+ export sha256sums_aarch64="$(sha256sum ./build/installers/figma-linux_${version}_linux_arm64.deb | awk '{print $1}' | tr -d '\n' )"
335335 echo "sha256sums_x86_64: $sha256sums_x86_64"
336336 echo "sha256sums_aarch64: $sha256sums_aarch64"
337- perl -pe 's{sha256:.*}{++$n == 1 ? \ "sha256: $ENV{'sha256sums_x86_64'}" : $&}ge' -i ./flatpak-repo/io.github.Figma_Linux.figma_linux.yml
338- perl -pe 's{sha256:.*}{++$n == 2 ? \ "sha256: $ENV{'sha256sums_aarch64'}" : $&}ge' -i ./flatpak-repo/io.github.Figma_Linux.figma_linux.yml
337+ perl -pe 's{sha256:.*}{++$n == 1 ? "sha256: $ENV{'sha256sums_x86_64'}" : $&}ge' -i ./flatpak-repo/io.github.Figma_Linux.figma_linux.yml
338+ perl -pe 's{sha256:.*}{++$n == 2 ? "sha256: $ENV{'sha256sums_aarch64'}" : $&}ge' -i ./flatpak-repo/io.github.Figma_Linux.figma_linux.yml
339339 echo 'cat ./flatpak-repo/io.github.Figma_Linux.figma_linux.appdata.xml after update sha sums'
340340 cat ./flatpak-repo/io.github.Figma_Linux.figma_linux.appdata.xml
341341 cat ./flatpak-repo/io.github.Figma_Linux.figma_linux.appdata.xml | tr -d '\n' > /tmp/tmp1
@@ -355,13 +355,6 @@ jobs:
355355 git commit -m "Release v$version"
356356 git push origin bump-version
357357
358- - uses : octokit/request-action@v2.x
359- name : Create Pull Request
360- id : cpr
361- with :
362- route : GET /repos/{owner}/{repo}/pulls
363- owner : flathub
364- body : ' {"title": "Release v${{ steps.update.outputs.release }} version","head":"Figma-Linux:bump-version","base":"master"}'
365- repo : io.github.Figma_Linux.figma_linux
366- env :
367- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
358+ - name : Create Pull Request
359+ run : |
360+ curl -X POST -u "ChugunovRoman:${{ secrets.REPO_ACCESS_TOKEN }}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/flathub/io.github.Figma_Linux.figma_linux/pulls -d '{"title": "Release v${{ steps.update.outputs.release }} version","head":"Figma-Linux:bump-version","base":"master"}'
0 commit comments