Repository navigation
55 lines (47 loc) · 1.66 KB
/
Copy pathrelease.yml
File metadata and controls
55 lines (47 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Release
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.11"
- run: python -m pip install build
- run: python -m build --wheel
- name: Attach the wheel to a GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: |
wheel=$(ls dist/*-py3-none-any.whl)
case "$wheel" in
*-"${GITHUB_REF_NAME#v}"-py3-none-any.whl) ;;
*) echo "Tag $GITHUB_REF_NAME does not match $wheel" >&2; exit 1 ;;
esac
gh release create "$GITHUB_REF_NAME" "$wheel" --verify-tag --generate-notes
- name: Print the plugin catalog entry
run: |
sha256=$(sha256sum dist/*-py3-none-any.whl | cut -d " " -f 1)
{
echo "To list this release in the DataLab plugin catalog, add"
echo "\`plugins/org.datalab.camera-characterization.yaml\` to"
echo "https://github.com/DataLab-Platform/plugins"
echo "(or only the new release if the plugin is already listed):"
echo
echo '```yaml'
cat <<'EOF'
id: org.datalab.camera-characterization
name: "Camera & Detector Characterization"
EOF
echo "repository: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
echo "capabilities: [application, processing]"
echo "releases:"
echo " - version: ${GITHUB_REF_NAME#v}"
echo " sha256: $sha256"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"