Merge pull request #934 from sigstore/renovate/actions-setup-go-5.x #597
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
- name: Setup Java | |
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.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 | |
env: | |
VERSION: ${{ steps.dev_version.outputs.version }} | |
run: ./test.sh -Dsigstore.version=${VERSION} |