-
-
Notifications
You must be signed in to change notification settings - Fork 7
48 lines (46 loc) · 1.26 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
name: Build Zip for Testing
on:
push:
branches:
- '**'
paths:
- 'calibre-plugin/**'
- '.github/workflows/**'
pull_request:
branches:
- '**'
paths:
- 'calibre-plugin/**'
- '.github/workflows/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 1
- name: Install requirements for linting
run: pip install -r requirements-dev.txt
- name: Lint
run: sh lint.sh
# - name: Run tests
# run: python -m unittest -v tests
- name: Install gtext
run: sudo apt-get -y install gettext
- name: Generate commit.txt and build .mo files
run: |
echo "$GITHUB_SHA" > calibre-plugin/commit.txt
cd .github/workflows
sh build_translations.sh
- name: Shorten GITHUB_SHA
run: echo "github_short_sha=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Upload plugin
uses: actions/upload-artifact@v3
with:
name: overdrive-libby-plugin-${{ env.github_short_sha }}
path: |
calibre-plugin/
!calibre-plugin/translations/*.po
!calibre-plugin/translations/*.pot