fix typo I just introduced #193
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: automatic-release | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '0 0 * * 6' | |
jobs: | |
l10n: | |
name: l10n | |
continue-on-error: true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Push l10n updates | |
run: | | |
git config --global user.name github-actions | |
git config --global user.email [email protected] | |
git remote add l10n https://github.com/nvdaaddons/MathCAT | |
git fetch l10n | |
git reset l10n/stable addon/doc addon/locale | |
git commit -m "Update translations" | |
git pull | |
git push | |
exit(0) # exiting with '1' for some reason, so force proper exit | |
rust: | |
name: build pyd file | |
needs: l10n | |
runs-on: windows-latest # needs to run on windows because no 32-bit python on linux | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
architecture: 'x86' | |
- name: Set up Rust | |
run: cargo build --target i686-pc-windows-msvc --release | |
- name: Set up addons dir | |
run: | | |
cp target/i686-pc-windows-msvc/release/libmathcat_py.dll addon/globalPlugins/MathCAT/libmathcat.pyd | |
sed 's/^import wx\.xrc/# import wx.xrc/' --in-place "addon/globalPlugins/MathCAT/MathCATgui.py" # fix wx file | |
- name: Upload addons dir to use with scons | |
uses: actions/upload-artifact@v4 | |
with: | |
name: MathCAT_addons | |
path: addon/globalPlugins | |
retention-days: 1 | |
pre-release: | |
name: Pre Release | |
continue-on-error: false | |
needs: rust | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Download MathCAT addons dir | |
uses: actions/download-artifact@v4 | |
with: | |
name: MathCAT_addons | |
- shell: bash | |
run: | | |
cp -r MathCAT addon/globalPlugins | |
- name: Install scons dependencies | |
run: | | |
pip install scons markdown | |
sudo apt update | |
sudo apt install gettext | |
- name: Run scons to build addon | |
run: | | |
scons | |
- name: copy standalone library so it has a meaningful name | |
run: | | |
cp addon/globalPlugins/MathCAT/libmathcat.pyd libmathcat-32-3.11.pyd | |
- name: Automatic release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
automatic_release_tag: latest | |
prerelease: true | |
title: Development Build | |
files: | | |
*.nvda-addon | |
libmathcat-32-3.11.pyd |