forked from nvdaaddons/instantTranslate
-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (52 loc) · 1.52 KB
/
release.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
name: Addon-release
on:
push:
tags:
- "v*"
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: 'pip'
- name: Install dependencies
run: |
pip install scons markdown
sudo apt update
sudo apt install gettext
- name: Build addon
run: scons
- name: Extract addon info
id: extract_addon_info
run: |
python -c "
from build_vars import addon_info
addon_name = addon_info["addon_name"]
addon_version = addon_info["addon_version"]
addon_updateChannel = addon_info[("addon_updateChannel"]
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
f.write(f'addon_name={addon_name}\n')
f.write(f'addon_version={addon_version}\n')
f.write(f'addon_updateChannel={addon_updateChannel}\n')
"
- name: Upload release
id: release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref_name }}
files: "*.nvda-addon"
generate_release_notes: true
prerelease: false
- name: Submit addon
run: |
echo "Addon Name: ${{ steps.extract_addon_info.outputs.addon_name }}"
echo "Addon Version: ${{ steps.extract_addon_info.outputs.addon_version }}"
echo "Addon Update Channel: ${{ steps.extract_addon_info.outputs.addon_updateChannel }}"