-
Notifications
You must be signed in to change notification settings - Fork 26
96 lines (78 loc) · 2.76 KB
/
examples.yaml
File metadata and controls
96 lines (78 loc) · 2.76 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Examples
on:
push:
branches: [main]
pull_request: {}
jobs:
examples-release:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: Build and run release examples on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-release
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
id-token: write
steps:
- name: Enable long paths in Git
if: runner.os == 'Windows'
run: git config --system core.longpaths true
shell: bash
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Java
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
java-version: 17
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- name: run examples against released sigstore
working-directory: examples/hello-world
shell: bash
run: ./test.sh
examples-dev:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: Build and run dev examples on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-dev
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
id-token: write
steps:
- name: Enable long paths in Git
if: runner.os == 'Windows'
run: git config --system core.longpaths true
shell: bash
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Java
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
java-version: 21
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- name: install sigstore java development jars into mavenLocal
run: ./gradlew publishToMavenLocal -Prelease -PskipSigning "-Porg.gradle.java.installations.auto-download=false"
- name: calculate development version
id: dev_version
shell: bash
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
shell: bash
env:
VERSION: ${{ steps.dev_version.outputs.version }}
run: ./test.sh -Dsigstore.version=${VERSION}