-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (73 loc) · 2.2 KB
/
Copy pathgithub_release.yml
File metadata and controls
85 lines (73 loc) · 2.2 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Make draft release
on:
workflow_dispatch:
inputs:
tag:
description: Version tag to create, for example v0.3.34
required: true
type: string
env:
HISTOPIA_REF: bf98d3e905a304d3318feddfedd231b67b8d0ba7
jobs:
build:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: "21"
distribution: temurin
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install pinned Histopia contract
run: >-
python -m pip install
"histopia[qupath,topology] @
git+https://github.com/oncologylab/histopia.git@${HISTOPIA_REF}"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6
- name: Build with Gradle
env:
HISTOPIA_PYTHON: python
run: ./gradlew build
- name: Upload release artifact
uses: actions/upload-artifact@v7
with:
name: qupath-extension-histopia-release
path: build/libs/qupath-extension-histopia-0.3.34.jar
retention-days: 7
release:
needs: build
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v8
with:
name: qupath-extension-histopia-release
- name: Validate tag and create checksum
env:
RELEASE_TAG: ${{ inputs.tag }}
run: |
test "$RELEASE_TAG" = "v0.3.34"
sha256sum qupath-extension-histopia-0.3.34.jar \
> qupath-extension-histopia-0.3.34.jar.sha256
- name: Create draft release
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ inputs.tag }}
run: |
gh release create "$RELEASE_TAG" \
--repo "$GITHUB_REPOSITORY" \
--target "$GITHUB_SHA" \
--draft \
--generate-notes \
--title "Histopia for QuPath 0.3.34" \
qupath-extension-histopia-0.3.34.jar \
qupath-extension-histopia-0.3.34.jar.sha256