Skip to content

Commit

Permalink
initial attempt, based on my telegram builder setup
Browse files Browse the repository at this point in the history
  • Loading branch information
AndydeCleyre committed Oct 29, 2020
1 parent 7840248 commit 4921292
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/buildpkg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build, upload, and publish Arch Linux package
on:
push:
tags:
- 'r[0-9]*'
jobs:
build:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2
with:
submodules: true

- name: prepare build ctnr
run: |
buildah from --name ctnr archlinux
buildah run ctnr pacman --noconfirm -Syu
buildah run ctnr pacman --noconfirm -S --needed base-devel git
buildah run ctnr useradd -m dev
buildah run ctnr sh -c 'printf "%s\n" "dev ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers.d/dev'
buildah config -u dev ctnr
buildah copy --chown dev ctnr ttf-iosevka-term-custom-git /home/dev/ttf-iosevka-term-custom-git
- name: build and install AUR deps
run: |
buildah run ctnr gpg --keyserver keys.gnupg.net --recv-keys 58E0C111E39F5408C5D3EC76C1A60EACE707FDA5
buildah run ctnr git clone https://aur.archlinux.org/ttfautohint /home/dev/ttfautohint
buildah config --workingdir /home/dev/ttfautohint ctnr
buildah run ctnr makepkg --noconfirm -si
- name: build pkg
run: |
buildah config --workingdir /home/dev/ttf-iosevka-term-custom-git ctnr
buildah run ctnr makepkg --noconfirm -s
buildah run ctnr ls -l
pkg="$(buildah run ctnr sh -c "printf '%s\n' ttf-iosevka-term-custom-git-*.pkg.*")"
buildah run ctnr cat "$pkg" >"$pkg"
echo "PKG=$pkg" >>$GITHUB_ENV
- name: create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: upload pkg as release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.PKG }}
asset_name: ${{ env.PKG }}
asset_content_type: application/zip
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ttf-iosevka-term-custom-git"]
path = ttf-iosevka-term-custom-git
url = https://aur.archlinux.org/ttf-iosevka-term-custom-git
15 changes: 15 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <[email protected]>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.

1 change: 1 addition & 0 deletions ttf-iosevka-term-custom-git
Submodule ttf-iosevka-term-custom-git added at 00cbb8

0 comments on commit 4921292

Please sign in to comment.