Skip to content

Commit 0ba218e

Browse files
committed
prepare ci for binary package
1 parent 0595a7b commit 0ba218e

File tree

6 files changed

+53
-51
lines changed

6 files changed

+53
-51
lines changed

.ci/generate-pkgbuild.sh

+16-16
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ rm ./.pkgbuild/lightdm-theme-neon/PKGBUILD.template
2323

2424

2525
#### lightdm-theme-neon-bin ####
26-
#
27-
# mkdir -p ./.pkgbuild/lightdm-theme-neon-bin
28-
# cp ./.pkg/aur/lightdm-theme-neon-bin/* ./.pkgbuild/lightdm-theme-neon-bin
29-
#
30-
# cat << EOF > ./.pkgbuild/lightdm-theme-neon-bin/PKGBUILD
31-
# # Maintainer: hertg <aur@her.tg>
32-
# # This file is generated automatically
33-
# _version=$version
34-
# _pkgname=lightdm-theme-neon-bin
35-
# _pkgver=$(echo $version | sed 's/\([^-]*-g\)/r\1/;s/-/./g')
36-
# _sha256sum=$checksum
37-
# _source=\${_pkgname}-\${_pkgver}::https://github.com/hertg/lightdm-neon/releases/download/$version/compiled.tar.gz
38-
# EOF
39-
#
40-
# cat ./.pkgbuild/lightdm-theme-neon-bin/PKGBUILD.template >> ./.pkgbuild/lightdm-theme-neon-bin/PKGBUILD
41-
# rm ./.pkgbuild/lightdm-theme-neon-bin/PKGBUILD.template
26+
27+
mkdir -p ./.pkgbuild/lightdm-theme-neon-bin
28+
cp ./.pkg/aur/lightdm-theme-neon-bin/* ./.pkgbuild/lightdm-theme-neon-bin
29+
30+
cat << EOF > ./.pkgbuild/lightdm-theme-neon-bin/PKGBUILD
31+
# Maintainer: hertg <aur@her.tg>
32+
# This file is generated automatically
33+
_version=$version
34+
_pkgname=lightdm-theme-neon-bin
35+
_pkgver=$(echo $version | sed 's/\([^-]*-g\)/r\1/;s/-/./g')
36+
_sha256sum=$checksum
37+
_source=\${_pkgname}-\${_pkgver}::https://github.com/hertg/lightdm-neon/releases/download/$version/build.tar.gz
38+
EOF
39+
40+
cat ./.pkgbuild/lightdm-theme-neon-bin/PKGBUILD.template >> ./.pkgbuild/lightdm-theme-neon-bin/PKGBUILD
41+
rm ./.pkgbuild/lightdm-theme-neon-bin/PKGBUILD.template

.github/workflows/aur-release.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ jobs:
2424
- name: Checkout
2525
uses: actions/checkout@v2
2626

27-
# - name: Download binary
28-
# uses: actions/download-artifact@v3
29-
# with:
30-
# name: lightdm-theme-neon-amd64
31-
# path: ./download
32-
#
33-
# - name: Export Checksum
34-
# run: echo "SHA256=$(cat ./download/sha256sum.txt | cut -d' ' -f1)" >> $GITHUB_ENV
27+
- name: Download build
28+
uses: actions/download-artifact@v3
29+
with:
30+
name: build.tar.gz
31+
path: ./download
32+
33+
- name: Export Checksum
34+
run: echo "SHA256=$(cat ./download/sha256sum.txt | cut -d' ' -f1)" >> $GITHUB_ENV
3535

3636
- name: Generate PKGBUILDs
3737
run: ./.ci/generate-pkgbuild.sh ${{ inputs.version }} ${{ env.SHA256 }}
@@ -42,11 +42,11 @@ jobs:
4242
name: lightdm-theme-neon-PKGBUILD
4343
path: ./.pkgbuild/lightdm-theme-neon/*
4444

45-
# - name: Upload lightdm-theme-neon-bin PKGBUILD
46-
# uses: actions/upload-artifact@v3
47-
# with:
48-
# name: lightdm-theme-neon-bin-PKGBUILD
49-
# path: ./.pkgbuild/lightdm-theme-neon-bin/*
45+
- name: Upload lightdm-theme-neon-bin PKGBUILD
46+
uses: actions/upload-artifact@v3
47+
with:
48+
name: lightdm-theme-neon-bin-PKGBUILD
49+
path: ./.pkgbuild/lightdm-theme-neon-bin/*
5050

5151
- name: Publish lightdm-theme-neon
5252
uses: KSXGitHub/github-actions-deploy-aur@v2.5.0

.github/workflows/build.yml

+18-11
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,23 @@ jobs:
2828
# see https://stackoverflow.com/a/71721059/2726733
2929
fetch-depth: 0
3030

31-
- name: Install and Build
32-
run: |
33-
npm install
34-
npm run build
31+
- name: Install
32+
run: npm ci
33+
34+
- name: Build
35+
run: npm run build
36+
37+
- name: Prepare bin directory
38+
run: mkdir -p ./bin
3539

36-
# - name: Create SHA256 Checksum
37-
# run: sha256sum ./bin/${{ env.BINARY_NAME }} > ./bin/sha256sum.txt || exit $?
40+
- name: Package build
41+
run: tar -czvf ./bin/build.tar.gz ./public
3842

39-
# - name: Upload binary
40-
# uses: actions/upload-artifact@v3
41-
# with:
42-
# name: ${{ env.BINARY_NAME }}
43-
# path: ./bin/*
43+
- name: Create SHA256 Checksum
44+
run: sha256sum ./bin/build.tar.gz > ./bin/sha256sum.txt || exit $?
45+
46+
- name: Upload build
47+
uses: actions/upload-artifact@v3
48+
with:
49+
name: ${{ env.BINARY_NAME }}
50+
path: ./bin/*

.github/workflows/github-release.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,19 @@ jobs:
1212
release:
1313
runs-on: ubuntu-latest
1414
name: Release
15-
# name: Release ${{ inputs.binary }}
1615
steps:
1716

1817
- name: Checkout
1918
uses: actions/checkout@v2
2019

21-
# - uses: actions/download-artifact@v3
22-
# with:
23-
# name: ${{ inputs.binary }}
24-
# path: ./download
20+
- uses: actions/download-artifact@v3
21+
with:
22+
name: build.tar.gz
23+
path: ./download
2524

2625
- name: Create Github Release
2726
uses: softprops/action-gh-release@v1
2827
with:
2928
draft: false
30-
# files: download/${{ inputs.binary }}
29+
files: download/build.tar.gz
3130
prerelease: ${{ contains(github.ref, '-rc.') }}

.github/workflows/release.yml

-5
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,7 @@ jobs:
2424
release:
2525
name: Github Release
2626
needs: [build, version]
27-
# strategy:
28-
# matrix:
29-
# binary: [ 'egpu-switcher-amd64', 'egpu-switcher-arm64' ]
3027
uses: ./.github/workflows/github-release.yml
31-
# with:
32-
# binary: ${{ matrix.binary }}
3328

3429
aur:
3530
name: Publish to AUR

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
public/assets/
33
public/bundle.*
44
/.pkgbuild/
5+
/bin/
56

67
.DS_Store

0 commit comments

Comments
 (0)