Skip to content

Commit

Permalink
Merge pull request #3 from cheshire-cat-ai/develop
Browse files Browse the repository at this point in the history
Update main workflow
  • Loading branch information
nicola-corbellini committed Aug 17, 2023
2 parents c40ca2c + 82f4e47 commit 9f52b41
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,26 @@ permissions:
env:
PLUGIN_JSON: "0.0.1"
TAG_EXISTS: false
PLUGIN_NAME: "my_plugin"

jobs:
check:
runs-on: ubuntu-latest
outputs:
plugin_name: ${{ steps.init.outputs.plugin_name }}
steps:
- name: Get plugin name
id: init
run: |
echo "plugin_name=${{ env.PLUGIN_NAME }}" >> $GITHUB_OUTPUT
release:
needs: check
if: startsWith(needs.check.outputs.plugin_name, 'MY_PLUGIN') == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
- name: Get plugin version
run: |
echo 'PLUGIN_JSON<<EOF' >> $GITHUB_ENV
Expand All @@ -40,15 +54,15 @@ jobs:
uses: TheDoctor0/zip-release@0.7.1
with:
type: 'zip'
filename: 'my_plugin.zip'
filename: '${{env.PLUGIN_NAME}}.zip'
exclusions: '*.git* setup.py'
directory: '.'
path: '.'
- name: Upload release
uses: ncipollo/release-action@v1.12.0
with:
tag: "${{fromJson(env.PLUGIN_JSON).version}}"
artifacts: 'my_plugin.zip'
artifacts: '${{env.PLUGIN_NAME}}.zip'
allowUpdates: true
replacesArtifacts: true
body: |
Expand Down

0 comments on commit 9f52b41

Please sign in to comment.