Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanahiro committed Oct 6, 2023
1 parent 2c4e860 commit 9739842
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: release
on:
release:
types: [published]

env:
PLUGIN_NAME: qgis-jaxa-earth-plugin-master
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
# 内容を書き換えるファイルの名前を一時的に変更
- name: rename some files to rewrite
run: |
cp ./metadata.txt ./metadata.old.txt
# metadata.txtにバージョン情報を書き込み
- name: metadata
run: |
sed -e "s/version=0.0.0/version=${{ github.event.release.tag_name }}/g" ./metadata.old.txt > ./metadata.txt
rm ./metadata.old.txt
- name: pull submodules
run: |
git submodule update --init --recursive
- name: Create Plugin Directory
run: |
mkdir ${{env.PLUGIN_NAME}}
find . -type f | grep -ve './.git' \
-ve '.github' \
-ve './.vscode' \
-ve '__pycache__/' \
-ve 'doc_imgs/' \
-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}}
2 changes: 1 addition & 1 deletion metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name=JAXA Earth API Plugin
qgisMinimumVersion=3.0
about=QGIS Plugin for JAXA Earth API
description=QGIS Plugin for JAXA Earth API, easily get satellite datasets.
version=1.2
version=0.0.0

#Plugin main icon
icon=imgs/icon.png
Expand Down

0 comments on commit 9739842

Please sign in to comment.