-
Notifications
You must be signed in to change notification settings - Fork 20
50 lines (39 loc) · 1.31 KB
/
examples.yaml
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
name: Examples
on:
push:
branches:
- '*'
pull_request:
branches:
- main
concurrency:
group: ${{ github.ref }}-examples
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
examples:
name: Build and run examples
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Setup Java
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
with:
java-version: 11
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
- name: run examples against released sigstore
working-directory: examples/hello-world
run: ./test.sh
- name: install sigstore java development jars into mavenLocal
run: ./gradlew publishToMavenLocal -Prelease -PskipSigning
- name: calculate development version
id: dev_version
run: |
set -Exeo pipefail
echo "version=$(grep "^version=" gradle.properties | cut -d'=' -f2)" >> $GITHUB_OUTPUT
- name: run examples against development version
working-directory: examples/hello-world
run: ./test.sh -Dsigstore.version=${{ steps.dev_version.outputs.version }}