-
Notifications
You must be signed in to change notification settings - Fork 29
90 lines (74 loc) · 2.68 KB
/
Copy pathexamples.yaml
File metadata and controls
90 lines (74 loc) · 2.68 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
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' }}
steps:
- name: Enable long paths in Git
if: runner.os == 'Windows'
run: git config --system core.longpaths true
shell: bash
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Setup Java
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.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' }}
steps:
- name: Enable long paths in Git
if: runner.os == 'Windows'
run: git config --system core.longpaths true
shell: bash
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Setup Java
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.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}