Skip to content

Commit 1b817ef

Browse files
committed
Use a separate workflow for cutting releases
Let's not run the mega-melt when cutting a release; just do it. I made a separate workflow to avoid needlessly restoring and/or saving the melting-pot cache, which won't be used for the release process.
1 parent 80e6327 commit 1b817ef

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

.github/build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/ci-build.sh &&
33
sh ci-build.sh || { echo "Maven build failed. Skipping melting pot tests."; exit 1; }
44

5+
if [ -f release.properties ]; then
6+
# Skip melting pot when cutting a release.
7+
exit 0
8+
fi
9+
510
# Helper method to get the last cache modified date as seconds since epoch
611
last_cache_modified() {
712
find "$HOME/.cache/scijava/melting-pot" -type f | while read f

.github/workflows/build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- master
7-
tags:
8-
- "*-[0-9]+.*"
97
pull_request:
108
branches:
119
- master

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: build
2+
3+
on:
4+
push:
5+
tags:
6+
- "*-[0-9]+.*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Java
15+
uses: actions/setup-java@v3
16+
with:
17+
java-version: '8'
18+
java-package: 'jdk+fx'
19+
distribution: 'zulu'
20+
cache: 'maven'
21+
22+
- name: Set up CI environment
23+
run: .github/setup.sh
24+
25+
- name: Execute the build
26+
id: execute-build
27+
run: .github/build.sh
28+
env:
29+
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
30+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
31+
MAVEN_USER: ${{ secrets.MAVEN_USER }}
32+
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
33+
OSSRH_PASS: ${{ secrets.OSSRH_PASS }}
34+
SIGNING_ASC: ${{ secrets.SIGNING_ASC }}

0 commit comments

Comments
 (0)