Skip to content

version 24.1.1

version 24.1.1 #1

Workflow file for this run

permissions:
contents: write
name: Upload on new tags
on:
push:
tags:
['*']
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- run: echo -e "scons\nmarkdown">requirements.txt
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: 'pip'
- name: Install dependencies
run: |
pip install scons markdown
sudo apt update
sudo apt install gettext
- name: Set add-on version from tag
run: |
import re
with open("buildVars.py", 'r+', encoding='utf-8') as f:
text = f.read()
version = "${{ github.ref }}".split("/")[-1]
text = re.sub('"addon_version" *:.*,', '"addon_version" : "%s",' % version, text)
f.seek(0)
f.write(text)
f.truncate()
shell: python
- name: Build add-on
run: scons
- name: load latest changes from changelog
run: awk '/^# / && !flag {flag=1; next} /^# / && flag {exit} flag && NF' changelog.md > newChanges.md
- name: Calculate sha256
run: sha256sum *.nvda-addon >> newChanges.md
- uses: actions/upload-artifact@v3
with:
name: packaged_addon
path: |
./*.nvda-addon
./newChanges.md
upload_release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: ["build"]
steps:
- name: download releases files
uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: packaged_addon/newChanges.md
files: packaged_addon/*.nvda-addon
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, '-') }}