Auto-close Plugin Runner #11
Workflow file for this run
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: Build and Release DOCXImport plugin | |
on: | |
push: | |
tags: | |
- 'v*' | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
env: | |
PLUGIN_NAME: "DOCXImport" | |
jobs: | |
build: | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get tag name | |
if: startswith( github.ref, 'refs/tags/') | |
id: get_tag_name | |
run: echo "TAGNAME=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 | |
pip install PyQt5==5.12.3 | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
flake8 buildplugin | |
flake8 . | |
- name: Update language files | |
run: | | |
pylupdate5 -verbose -translate-function _t *.py -ts ./translations/template.ts | |
- name: Commit any language TS files updated | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_user_name: GitHub Actions Bot | |
commit_user_email: [email protected] | |
commit_author: Doug Massay <[email protected]> | |
commit_message: Update TS files with 5.12 lupdate [skip ci] | |
- name: Cache Qt | |
id: cache-qt | |
uses: actions/cache@v3 | |
with: | |
path: ${{runner.workspace}}/Qt | |
key: ${{ runner.os }}-qttools-${{ hashFiles('**/reset-caches.txt') }} | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: '5.12.3' | |
dir: ${{runner.workspace}}/Qt | |
setup-python: 'false' | |
archives: 'qtbase qttools icu' | |
cache: ${{ steps.cache-qt.outputs.cache-hit }} | |
- name: Build Plugin | |
run: | | |
python buildplugin --language | |
- name: Upload Artifact | |
if: "contains(github.event.head_commit.message, '[deploy]')" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docximport-artifact | |
path: ./*.zip | |
retention-days: 3 | |
- name: Create Release | |
if: startswith( github.ref, 'refs/tags/') | |
uses: ncipollo/release-action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: ${{ env.PLUGIN_NAME }} ${{ steps.get_tag_name.outputs.TAGNAME }} | |
body: | | |
Changes in this Release | |
- First Change | |
- Second Change | |
draft: true | |
prerelease: false | |
artifacts: './*.zip' |