Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions .github/web-meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
shortdesc: "SIST - A tool for calculating Stress-Induced Structural Transition probabilities in superhelical."
longdesc: "SIST calculates stress-induced structural transition probabilities in superhelical DNA, including strand separation, Z-DNA formation, cruciform extrusion, and competition between these transitions."
category: "scientific"
image: "sist-logo.svg"
pypi: false
conda: true
ghcr: false
62 changes: 62 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,68 @@ jobs:
--data-urlencode "topic=software releases" \
--data-urlencode "content=${CONTENT}"

- name: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Build dispatch payload
id: payload
shell: bash
env:
NAME: ${{ github.event.repository.name }}
REPO_URL: ${{ github.server_url }}/${{ github.repository }}
VERSION: ${{ github.event.inputs.version }}
META_FILE: .github/web-meta.yaml
CFF_FILE: CITATION.cff
run: |
for f in "$META_FILE" "$CFF_FILE"; do
if [ ! -f "$f" ]; then
echo "::error::$f not found in $(pwd)"
ls -la . .github
exit 1
fi
done

# Constructed URLs (Read the Docs slugs are lowercase)
github_url="$REPO_URL"
docs_url="https://${NAME,,}.readthedocs.io/"

# Metadata from web-meta.yaml
meta=$(yq -o=json '.' "$META_FILE")

# Authors from CITATION.cff -> { "Full Name": "orcid url" }
authors=$(yq -o=json '.authors' "$CFF_FILE" | jq -c '
map({
key: (
if .name then .name
else ([."given-names", ."family-names"] | map(select(. != null)) | join(" "))
end
),
value: (.orcid // "")
}) | from_entries')

payload=$(jq -nc \
--arg name "$NAME" \
--arg github "$github_url" \
--arg docs "$docs_url" \
--arg version "$VERSION" \
--argjson meta "$meta" \
--argjson authors "$authors" \
'{
name: $name,
meta: ({github: $github, docs: $docs} + $meta + {version: $version, authors: $authors})
}')

echo "payload: $payload"
echo "json=$payload" >> "$GITHUB_OUTPUT"

- name: Post version to website metadata repo
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1
with:
token: ${{ secrets.BUILD_TOKEN }}
repository: ccpbiosim/ccpbiosim.github.io
event-type: software
client-payload: ${{ steps.payload.outputs.json }}

conda:
name: publish conda to anaconda.org (${{ matrix.os }})
needs: [tag, release]
Expand Down
Loading