-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (53 loc) · 1.63 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Build and Release
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Run Tests
run: mvn test
- name: Build with Maven
run: mvn clean package
- name: Upload JAR as artifact
uses: actions/upload-artifact@v3
with:
name: keycloak-webhook-listener
path: target/*.jar
# Comment the release workflow for now, as we lack the permissions to create a release on GitHub
# release:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: Download JAR artifact
# uses: actions/download-artifact@v3
# with:
# name: keycloak-webhook-listener
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: v1.0.${{ github.run_number }}
# release_name: Release v1.0.${{ github.run_number }}
# draft: false
# prerelease: false
# - name: Upload JAR to Release
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: target/*.jar
# asset_name: keycloak-webhook-listener.jar
# asset_content_type: application/java-archive