mirror of
https://github.com/danbulant/nekofetch
synced 2026-06-18 13:51:11 +00:00
Switch GitHub Actions jobs to use Makefile (#3)
* Move nekofetch to root of repository * Add Makefile * Use Makefile for CI and CD jobs
This commit is contained in:
parent
0c0b8f71bd
commit
e63738e9e2
5 changed files with 56 additions and 42 deletions
25
.github/workflows/deployment.yml
vendored
25
.github/workflows/deployment.yml
vendored
|
|
@ -11,9 +11,6 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Get version
|
||||
id: version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
|
||||
|
||||
- name: Create release
|
||||
id: create_release
|
||||
|
|
@ -26,24 +23,10 @@ jobs:
|
|||
draft: true
|
||||
prerelease: false
|
||||
|
||||
- name: Build deb for iphoneos-arm
|
||||
uses: jiro4989/build-deb-action@v2
|
||||
with:
|
||||
package: com.propr.nekofetch
|
||||
package_root: pkgroot
|
||||
maintainer: propr and bbaovanc
|
||||
version: ${{ steps.version.outputs.VERSION }}
|
||||
arch: 'iphoneos-arm'
|
||||
desc: 'neofetch with nekos'
|
||||
- name: Build deb for amd64
|
||||
uses: jiro4989/build-deb-action@v2
|
||||
with:
|
||||
package: nekofetch
|
||||
package_root: pkgroot
|
||||
maintainer: propr and bbaovanc
|
||||
version: ${{ steps.version.outputs.VERSION }}
|
||||
arch: 'amd64'
|
||||
desc: 'neofetch with nekos'
|
||||
- name: Build iOS deb
|
||||
run: make iosdeb
|
||||
- name: Build amd64 deb
|
||||
run: make amd64deb
|
||||
|
||||
- name: Upload iphoneos-arm asset
|
||||
id: upload-iphoneos-arm-asset
|
||||
|
|
|
|||
26
.github/workflows/integration.yml
vendored
26
.github/workflows/integration.yml
vendored
|
|
@ -9,6 +9,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Run shellcheck
|
||||
uses: ludeeus/action-shellcheck@master
|
||||
|
||||
|
|
@ -17,28 +18,11 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Get commit hash
|
||||
id: hash
|
||||
run: echo "::set-output name=SHA_SHORT::$(git rev-parse --short HEAD)"
|
||||
|
||||
- name: Build deb for iphoneos-arm
|
||||
uses: jiro4989/build-deb-action@v2
|
||||
with:
|
||||
package: com.propr.nekofetch
|
||||
package_root: pkgroot
|
||||
maintainer: propr and bbaovanc
|
||||
version: 0-git-${{ steps.hash.outputs.sha_short }}
|
||||
arch: 'iphoneos-arm'
|
||||
desc: 'neofetch with nekos'
|
||||
- name: Build deb for amd64
|
||||
uses: jiro4989/build-deb-action@v2
|
||||
with:
|
||||
package: nekofetch
|
||||
package_root: pkgroot
|
||||
maintainer: propr and bbaovanc
|
||||
version: 0-git-${{ steps.hash.outputs.sha_short }}
|
||||
arch: 'amd64'
|
||||
desc: 'neofetch with nekos'
|
||||
- name: Build iOS deb
|
||||
run: make iosdeb
|
||||
- name: Build amd64 deb
|
||||
run: make amd64deb
|
||||
|
||||
- name: Upload iphoneos-arm deb as artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
|
|
|
|||
42
Makefile
Normal file
42
Makefile
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
VERSION ?= $(shell git tag --points-at HEAD)
|
||||
VERSION += 0-git-$(shell git rev-parse --short HEAD)
|
||||
VERSION := $(word 1, $(VERSION))
|
||||
|
||||
all: options iosdeb amd64deb
|
||||
|
||||
options:
|
||||
@echo "VERSION: $(VERSION)"
|
||||
|
||||
ioscontrol:
|
||||
cp control.template ioscontrol
|
||||
sed -i 's/PACKAGE/com.propr.nekofetch/' ioscontrol
|
||||
sed -i 's/ARCH/iphoneos-arm/' ioscontrol
|
||||
sed -i 's/VERSION/$(VERSION)/' ioscontrol
|
||||
amd64control:
|
||||
cp control.template amd64control
|
||||
sed -i 's/PACKAGE/nekofetch/' amd64control
|
||||
sed -i 's/ARCH/amd64/' amd64control
|
||||
sed -i 's/VERSION/$(VERSION)/' amd64control
|
||||
|
||||
iosdebroot: ioscontrol
|
||||
mkdir -p iosdebroot/DEBIAN
|
||||
mkdir -p iosdebroot/usr/bin
|
||||
cp ioscontrol iosdebroot/DEBIAN/control
|
||||
cp nekofetch iosdebroot/usr/bin/nekofetch
|
||||
amd64debroot: amd64control
|
||||
mkdir -p amd64debroot/DEBIAN
|
||||
mkdir -p amd64debroot/usr/bin
|
||||
cp amd64control amd64debroot/DEBIAN/control
|
||||
cp nekofetch amd64debroot/usr/bin/nekofetch
|
||||
|
||||
iosdeb: iosdebroot
|
||||
dpkg-deb -b "iosdebroot" "com.propr.nekofetch_$(VERSION)_iphoneos-arm.deb"
|
||||
amd64deb: amd64debroot
|
||||
dpkg-deb -b "amd64debroot" "nekofetch_$(VERSION)_amd64.deb"
|
||||
|
||||
clean:
|
||||
rm -rf iosdebroot amd64debroot
|
||||
rm -f ioscontrol amd64control
|
||||
rm -f com.propr.nekofetch_*_iphoneos-arm.deb nekofetch_*_amd64.deb
|
||||
|
||||
.PHONY: all options clean iosdeb amd64deb
|
||||
5
control.template
Normal file
5
control.template
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Package: PACKAGE
|
||||
Architecture: ARCH
|
||||
Version: VERSION
|
||||
Depends: curl, jq, jp2a, neofetch
|
||||
Description: neofetch but with nekos
|
||||
Loading…
Reference in a new issue