-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (77 loc) · 2.15 KB
/
Copy pathbuild_addon.yml
File metadata and controls
92 lines (77 loc) · 2.15 KB
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
name: build addon
on:
push:
tags: ["*"]
branches: [ main ]
pull_request:
branches: [ teleNVDA ]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
- run: echo -e "uv\npre-commit\nscons\nmarkdown">requirements.txt
- name: Set up Python
uses: actions/setup-python@v7.0.0
with:
python-version: 3.13
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements.txt
sudo apt-get update -y
sudo apt-get install -y gettext
# - name: Code checks
# run: export SKIP=no-commit-to-branch; pre-commit run --all
- name: building addon
shell: bash
run: |
rm -f ./*.nvda-addon
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
version="${GITHUB_REF_NAME#v}"
scons "version=${version}"
else
scons
fi
scons pot
- uses: actions/upload-artifact@v7.0.1
with:
name: packaged_addon
path: |
./*.nvda-addon
./*.pot
upload_release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref_name, '-') }}
needs: ["build"]
steps:
- uses: actions/checkout@v7.0.0
- name: Remove old packages
run: rm -f ./*.nvda-addon
- name: download releases files
uses: actions/download-artifact@v8.0.1
- name: Display structure of downloaded files
run: ls -R
- name: Calculate sha256
shell: bash
run: |
find . -type f -name '*.nvda-addon' -print0 | while IFS= read -r -d '' file; do
sha256sum "$file" > "$file.sha256"
done
- name: Release
uses: softprops/action-gh-release@v3.0.2
with:
tag_name: ${{ github.ref_name }}
target_commitish: ${{ github.sha }}
name: TeleNVDA ${{ github.ref_name }}
files: |
**/*.nvda-addon
**/*.nvda-addon.sha256
**/*.pot
body_path: changelog.md
fail_on_unmatched_files: true
prerelease: false