Skip to content

Commit 554d8c6

Browse files
Refactor build scripts (#2)
1 parent ee28fbc commit 554d8c6

File tree

4 files changed

+56
-9
lines changed

4 files changed

+56
-9
lines changed

.github/workflows/jars.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
name: Make JARs with CMake
22
on:
3-
- workflow_call
4-
- workflow_dispatch
3+
workflow_call:
4+
inputs:
5+
c_blosc_version:
6+
description: Semantic version of c-blosc to package.
7+
type: string
8+
default: "1.21.5"
9+
required: true
10+
511
jobs:
612
ci-cmake:
713
name: ${{ matrix.name }}
@@ -40,7 +46,7 @@ jobs:
4046
- uses: actions/checkout@v4
4147
with:
4248
repository: Blosc/c-blosc
43-
ref: v1.21.5
49+
ref: v${{ inputs.c_blosc_version }}
4450

4551
- name: Generate project files
4652
run: |

.github/workflows/release.yml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,44 @@
11
name: Publish release to SciJava Maven
22

33
on:
4-
release:
5-
types: [published]
4+
workflow_dispatch:
5+
inputs:
6+
c_blosc_version:
7+
description: Semantic version of c-blosc to package.
8+
type: string
9+
default: "1.21.5"
10+
required: true
611

712
jobs:
813
jars:
914
name: Build jars
1015
uses: ./.github/workflows/jars.yml
16+
with:
17+
c_blosc_version: ${{ inputs.c_blosc_version }}
18+
19+
release:
20+
needs: jars
21+
name: Draft release
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- uses: actions/download-artifact@v4
28+
with:
29+
merge-multiple: true
30+
pattern: blosc-natives*
31+
32+
- name: Release
33+
env:
34+
GH_TOKEN: ${{ github.token }}
35+
run: |
36+
gh release create --draft v${{ inputs.c_blosc_version }} -t ${{ github.sha }} --title v${{ inputs.c_blosc_version }} \
37+
blosc-natives-v${{ inputs.c_blosc_version }}-darwin-aarch64.jar \
38+
blosc-natives-v${{ inputs.c_blosc_version }}-darwin-x86-64.jar \
39+
blosc-natives-v${{ inputs.c_blosc_version }}-linux-x86-64.jar \
40+
blosc-natives-v${{ inputs.c_blosc_version }}-win32-x86-64.jar \
41+
blosc-natives-v${{ inputs.c_blosc_version }}.jar
1142
1243
publish:
1344
needs: jars
@@ -33,7 +64,7 @@ jobs:
3364
- name: Publish snapshot
3465
uses: gradle/[email protected]
3566
with:
36-
arguments: publish -P release=true
67+
arguments: publish -P release=true -P blosc_version=${{ inputs.c_blosc_version }}
3768
env:
3869
MAVEN_USER: ${{ secrets.MAVEN_USER }}
3970
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}

.github/workflows/snapshot.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,22 @@ name: Publish snapshot to SciJava Maven
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
c_blosc_version:
7+
description: Semantic version of c-blosc to package.
8+
type: string
9+
default: "1.21.5"
10+
required: true
11+
512

613
jobs:
714
jars:
815
name: Build jars
916
uses: ./.github/workflows/jars.yml
10-
17+
with:
18+
c_blosc_version: ${{ inputs.c_blosc_version }}
19+
20+
1121
publish:
1222
needs: jars
1323

@@ -34,7 +44,7 @@ jobs:
3444
- name: Publish snapshot
3545
uses: gradle/gradle-build-action@v2
3646
with:
37-
arguments: publish
47+
arguments: publish -P blosc_version=${{ inputs.c_blosc_version }}
3848
env:
3949
MAVEN_USER: ${{ secrets.MAVEN_USER }}
4050
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
group = 'io.github.qupath'
6-
version = '1.21.5'
6+
version = project.findProperty("blosc_version") ?: "1.21.6"
77

88
publishing {
99
repositories {

0 commit comments

Comments
 (0)