-
-
Notifications
You must be signed in to change notification settings - Fork 21
112 lines (94 loc) · 2.3 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Build
on:
push:
branches:
- master
paths:
- 'eask'
- '**.yml'
- lisp/**
- cmds/**
- src/**
- test/**
- '**.json'
pull_request:
branches:
- master
paths-ignore:
- '**.md'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
VERSION: 0.8.4
NODE: node16
REPO_BIN: 'emacs-eask/binaries'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targets:
- linux-arm64
- linux-x64
- macos-arm64
- macos-x64
- win-arm64
- win-x64
steps:
- uses: actions/checkout@v4
- name: Install pkg
run: npm install -g pkg
- name: Preparing...
run: npm install
- name: Building...
run: npm run-script pkg-${{ matrix.targets }}
- name: Prepare content...
run: |
mv lisp dist
mv COPYING dist
mv README.md dist
- name: Uploading...
uses: actions/upload-artifact@v3
with:
name: eask_${{ env.VERSION }}_${{ matrix.targets }}
path: dist
- name: Zipping dist
working-directory: dist
run: |
zip -r ${{ matrix.targets }}.zip .
mv ${{ matrix.targets }}.zip ../
- name: Move zip to HOME
run: mv ${{ matrix.targets }}.zip ~/
- name: Checkout binaries repository
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_BIN }}
persist-credentials: false
fetch-depth: 0
- name: Clean up previous binaires
continue-on-error: true
run: rm -rf eask/${{ matrix.targets }}.zip
- name: Move binaires to repository
run: mv ~/${{ matrix.targets }}.zip ./
- name: Set git config
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Commit
continue-on-error: true
run: |
git pull
git add .
git commit -m "Update binairs ${{ matrix.targets }}.zip"
- name: Push
if: github.ref == 'refs/heads/master'
uses: jcs090218/github-push-action@master
with:
repository: ${{ env.REPO_BIN }}
github_token: ${{ secrets.PAT }}
branch: master
rebase: true
retry: 7