Skip to content

v0.1.4

v0.1.4 #27

Workflow file for this run

name:
export_plugin
on:
release:
types: [published]
env:
PLUGIN_NAME: qgis-plugx-plugin
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# 内容を書き換えるファイルの名前を一時的に変更
- name: rename some files to rewrite
run: |
cp ./metadata.txt ./metadata.old.txt
cp ./ui/about_dialog.ui ./ui/about_dialog.old.ui
# metadata.txtにバージョン情報を書き込み
- name: metadata
run : |
sed -e "s/version={{PLUGIN_VERSION}}/version=${{ github.event.release.tag_name }}/g" ./metadata.old.txt > ./metadata.txt
sed -e "s/{{PLUGIN_VERSION}}/${{ github.event.release.tag_name }}/g" ./ui/about_dialog.old.ui > ./ui/about_dialog.ui
rm ./metadata.old.txt ./ui/about_dialog.old.ui
- name: Create Plugin Directory
run: |
mkdir ${{env.PLUGIN_NAME}}
find . -type f | grep -ve './.git' \
-ve '.github' \
-ve './.vscode' \
-ve '__pycache__/' \
-ve './tests' \
-ve './pyproject.toml' \
-ve './poetry.toml' \
-ve './poetry.lock' | xargs -I src cp --parents src ${{env.PLUGIN_NAME}}
- name: Create Archive
run: |
zip -r ${{env.PLUGIN_NAME}}.zip ./${{env.PLUGIN_NAME}}
- name: Upload release asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.event.release.tag_name }} ${{env.PLUGIN_NAME}}.zip#${{env.PLUGIN_NAME}}