Skip to content

Merge pull request #30 from deefrawley/version-bump #15

Merge pull request #30 from deefrawley/version-bump

Merge pull request #30 from deefrawley/version-bump #15

name: Publish Release
on:
workflow_dispatch:
push:
branches: [ main ]
paths-ignore:
- .github/workflows/*
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: get version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: 'plugin.json'
prop_path: 'Version'
- run: echo ${{steps.version.outputs.prop}}
- name: Install dependencies
run: |
sudo apt-get install -y gettext
python -m pip install --upgrade pip
pip install -r ./requirements.txt -t ./lib
msgfmt ./plugin/translations/en/LC_MESSAGES/messages.po -o ./plugin/translations/en/LC_MESSAGES/messages.mo
msgfmt ./plugin/translations/zh/LC_MESSAGES/messages.po -o ./plugin/translations/zh/LC_MESSAGES/messages.mo
zip -r Flow.Launcher.Plugin.GenConvert.zip . -x '*.git*'
- name: Publish
if: success() && github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v1
with:
files: 'Flow.Launcher.Plugin.GenConvert.zip'
tag_name: "v${{steps.version.outputs.prop}}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}