Skip to content

Commit d52f0ea

Browse files
committed
2 parents 328d52e + d03de81 commit d52f0ea

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/Publish Release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Publish Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main ]
7+
paths-ignore:
8+
- .github/workflows/*
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: [3.8]
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: get version
23+
id: version
24+
uses: notiz-dev/github-action-json-property@release
25+
with:
26+
path: 'plugin.json'
27+
prop_path: 'Version'
28+
- run: echo ${{steps.version.outputs.prop}}
29+
- name: Install dependencies
30+
run: |
31+
sudo apt-get install -y gettext
32+
python -m pip install --upgrade pip
33+
pip install -r ./requirements.txt -t ./lib
34+
msgfmt ./plugin/translations/en/LC_MESSAGES/messages.po -o ./plugin/translations/en/LC_MESSAGES/messages.mo
35+
msgfmt ./plugin/translations/zh/LC_MESSAGES/messages.po -o ./plugin/translations/zh/LC_MESSAGES/messages.mo
36+
zip -r Flow.Launcher.Plugin.GenConverter.zip . -x '*.git*'
37+
- name: Publish
38+
if: success() && github.ref == 'refs/heads/main'
39+
uses: softprops/action-gh-release@v1
40+
with:
41+
files: 'Flow.Launcher.Plugin.GenConverter.zip'
42+
tag_name: "v${{steps.version.outputs.prop}}"
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)