Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymond Lay authored Jun 25, 2024
1 parent c18183f commit 7c857a7
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name:
export_plugin
on:
release:
types: [published]

env:
PLUGIN_NAME: ElevationTile4JP
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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}}

0 comments on commit 7c857a7

Please sign in to comment.