Skip to content

Commit 756a772

Browse files
Use actions repo (#16)
1 parent d331f99 commit 756a772

File tree

7 files changed

+53
-107
lines changed

7 files changed

+53
-107
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,13 @@ on:
55
branches:
66
- "main"
77
pull_request:
8-
branches:
8+
branches:
99
- "main"
1010
workflow_dispatch:
11-
workflow_call:
1211

1312
permissions:
1413
contents: read
1514

1615
jobs:
1716
build:
18-
runs-on: ubuntu-latest
19-
20-
steps:
21-
22-
- uses: actions/checkout@v4
23-
24-
- name: Set up JDK 21
25-
uses: actions/setup-java@v4
26-
with:
27-
java-version: '21'
28-
distribution: 'temurin'
29-
30-
- name: Setup Gradle
31-
uses: gradle/actions/setup-gradle@v4
32-
33-
- name: Build with Gradle
34-
run: |
35-
./gradlew build
36-
37-
- uses: actions/upload-artifact@v4
38-
with:
39-
path: build/libs/*.jar
40-
name: build
41-
retention-days: 7
17+
uses: qupath/actions/.github/workflows/gradle.yml@main

.github/workflows/github_release.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,6 @@ on:
55

66
jobs:
77
build:
8-
name: Run build
9-
uses: ./.github/workflows/build.yml
10-
11-
release:
12-
needs: build
138
permissions:
149
contents: write
15-
runs-on: ubuntu-latest
16-
steps:
17-
18-
- uses: actions/checkout@v4
19-
- uses: actions/download-artifact@v4
20-
21-
- name: Release
22-
env:
23-
GH_TOKEN: ${{ github.token }}
24-
run: gh release create --draft ${{ github.ref_name }} --title ${{ github.ref_name }} build/*.jar
10+
uses: qupath/actions/.github/workflows/github-release.yml@main

.github/workflows/maven.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/maven_release.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/maven_snapshot.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Publish release to SciJava Maven
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release:
7+
type: boolean
8+
description: Whether to make a release, or if not a snapshot
9+
required: true
10+
11+
jobs:
12+
build:
13+
name: Publish release
14+
uses: qupath/actions/.github/workflows/scijava-maven.yml@main
15+
secrets: inherit
16+
with:
17+
release: ${{ inputs.release }}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Update gradle version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
gradle-version:
7+
description: Gradle version
8+
default: latest
9+
type: string
10+
required: false
11+
12+
jobs:
13+
update:
14+
env:
15+
GH_TOKEN: ${{ github.token }}
16+
runs-on: ubuntu-latest
17+
defaults:
18+
run:
19+
shell: bash
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Update gradlew
23+
run: |
24+
./gradlew wrapper --gradle-version ${{ inputs.gradle-version }}
25+
- name: Commit and push
26+
run: |
27+
git config user.name "github-actions[bot]"
28+
git config user.email "github-actions[bot]@users.noreply.github.com"
29+
git checkout -b gradle-update
30+
git add .
31+
git commit --allow-empty -m "Update gradle via qupath/actions/.github/workflows/update-gradle.yml"
32+
git push -u origin gradle-update
33+
gh pr create --title "Update gradle via actions" --body "$(./gradlew --version)"

0 commit comments

Comments
 (0)