Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/workflows/publish-fair.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Publish FAIR Metadata

on:
push:
tags: ["v*"]
workflow_run:
workflows: ["Upload Release Asset"]
types: [completed]
workflow_dispatch:
inputs:
version:
Expand All @@ -16,17 +17,27 @@ permissions:
jobs:
publish:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get tag
id: tag
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" && -n "${{ inputs.version }}" ]]; then
echo "tag=${{ inputs.version }}" >> $GITHUB_OUTPUT
else
echo "tag=${{ github.event.workflow_run.head_branch }}" >> $GITHUB_OUTPUT
fi

- name: Publish to FAIR
uses: fairpm/fair-pulse@v1
with:
version: ${{ inputs.version }}
artifact-name: my-plugin.zip
version: ${{ steps.tag.outputs.tag }}
artifact-name: ${{ github.event.repository.name }}-${{ steps.tag.outputs.tag }}.zip
upload-metadata: 'true'
env:
FAIR_VERIFICATION_KEY_PRIVATE: ${{ secrets.FAIR_VERIFICATION_KEY_PRIVATE }}
Expand Down
Loading