Skip to content

Update plugin.json

Update plugin.json #11

Workflow file for this run

name: Create Release
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
tags:
- "v*.*.*"
permissions:
contents: write
pull-requests: write
env:
PLUGIN_JSON: "0.0.1"
TAG_EXISTS: false
jobs:
release:
strategy:
matrix:
python-version: ["3.10"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip
if [ -f my_plugin/requirements.txt ]; then pip install -r my_plugin/requirements.txt; fi
- name: Get version
run: |
echo 'PLUGIN_JSON<<EOF' >> $GITHUB_ENV
cat ./my_plugin/plugin.json >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Publish tag
if: env.TAG_EXISTS == false
uses: rickstaa/action-create-tag@v1
with:
tag: "${{fromJson(env.PLUGIN_JSON).version}}"
tag_exists_error: false
message: "Latest release"
- name: Zip Release
uses: TheDoctor0/zip-release@0.7.1
with:
type: 'zip'
filename: 'my_plugin.zip'
directory: '.'
path: './my_plugin'
- name: Upload Release
uses: ncipollo/release-action@v1.12.0
with:
tag: "${{fromJson(env.PLUGIN_JSON).version}}"
artifacts: 'my_plugin.zip'
allowUpdates: true
replacesArtifacts: true
body: |
${{ github.event.head_commit.message }}
token: ${{ secrets.GITHUB_TOKEN }}