Skip to content

Commit ec7172f

Browse files
New actions (#27)
1 parent 9681dcf commit ec7172f

File tree

5 files changed

+69
-56
lines changed

5 files changed

+69
-56
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Run gradle build
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
branches:
9+
- "main"
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
uses: qupath/actions/.github/workflows/gradle.yml@main

.github/workflows/github_release.yml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,7 @@ on:
44
workflow_dispatch:
55

66
jobs:
7-
jpackage:
8-
name: Run JPackage
9-
uses: ./.github/workflows/jpackage.yml
10-
11-
release:
12-
needs: jpackage
7+
build:
138
permissions:
149
contents: write
15-
runs-on: ubuntu-latest
16-
steps:
17-
18-
- name: Checkout
19-
uses: actions/checkout@v4
20-
21-
- uses: actions/download-artifact@v4
22-
23-
- name: Release
24-
env:
25-
GH_TOKEN: ${{ github.token }}
26-
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/jpackage.yml

Lines changed: 0 additions & 38 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)