Skip to content

Commit d140c8a

Browse files
committed
Updates for GitHub actions
1 parent 6efaa41 commit d140c8a

File tree

3 files changed

+64
-37
lines changed

3 files changed

+64
-37
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: tests
1+
name: Tests
22
on: [push]
33

44
###
55

66
jobs:
77

88
test:
9-
9+
timeout-minutes: 30
1010
strategy:
1111
matrix:
1212
java-version:
@@ -18,20 +18,20 @@ jobs:
1818

1919
steps:
2020
- name: Checkout repository
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222
- name: Prepare Java
23-
uses: actions/setup-java@v3
23+
uses: actions/setup-java@v4
2424
with:
2525
distribution: 'zulu'
2626
java-version: ${{ matrix.java-version }}
2727
- name: Maven dependencies cache
28-
uses: actions/cache@v3
28+
uses: actions/cache@v4
2929
with:
3030
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3131
path: ~/.m2
3232
restore-keys: ${{ runner.os }}-m2
3333
- name: Install and run tests
34-
run: mvn clean install
34+
run: mvn -B clean verify
3535
- name: Upload Artifact
3636
uses: actions/upload-artifact@v4
3737
with:

.github/workflows/release.unused

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

.github/workflows/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# .github/workflows/release.yml
2+
name: Release
3+
4+
on:
5+
push:
6+
tags:
7+
- '*.*.*' # matches 1.0.0, 2.3.4, etc.
8+
9+
permissions:
10+
contents: write # Needed to create the GitHub Release + upload assets
11+
12+
jobs:
13+
build-and-release:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0 # Required for changelog generation
21+
22+
- name: Set up JDK 21
23+
uses: actions/setup-java@v4
24+
with:
25+
distribution: zulu
26+
java-version: 21
27+
cache: maven
28+
29+
- name: Cache Maven dependencies
30+
uses: actions/cache@v4
31+
with:
32+
path: ~/.m2/repository
33+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
34+
restore-keys: ${{ runner.os }}-maven-
35+
36+
- name: Build with tests # fails if tests break
37+
run: mvn -B clean verify
38+
39+
- name: Create GitHub Release
40+
uses: actions/create-release@v1
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
tag_name: ${{ github.ref_name }}
45+
release_name: ${{ github.ref_name }}
46+
body: ${{ steps.changelog.outputs.changelog }}
47+
draft: false
48+
prerelease: false
49+
50+
- name: Upload integrated JAR as release asset
51+
uses: actions/upload-release-asset@v1
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
with:
55+
upload_url: ${{ steps.create-release.outputs.upload_url }}
56+
asset_path: convex-integration/target/convex.jar
57+
asset_name: convex-${{ github.ref_name }}.jar
58+
asset_content_type: application/java-archive

0 commit comments

Comments
 (0)