-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (43 loc) · 1.34 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name:
export_plugin
on:
release:
types: [published]
env:
PLUGIN_NAME: QuickDEM4JP
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
# 内容を書き換えるファイルの名前を一時的に変更
- name: rename some files to rewrite
run: |
cp ./metadata.txt ./metadata.old.txt
# metadata.txtにバージョン情報を書き込み
- name: metadata
run : |
sed -e "s/version={{PLUGIN_VERSION}}/version=${{ github.event.release.tag_name }}/g" ./metadata.old.txt > ./metadata.txt
rm ./metadata.old.txt
- 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}}