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