Merge pull request #1252 from znsio/substitution_syntax #232
Workflow file for this run
This file contains 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
# This workflow will build a Java project with Gradle | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
# For creating the release: https://github.com/marketplace/actions/gh-release | |
name: Release Build | |
on: | |
push: | |
tags: | |
- '*.*.*' | |
- 'SNAPSHOT' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: application/build/libs/specmatic.jar | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
dispatch: | |
needs: build | |
strategy: | |
matrix: | |
repository: [znsio/specmatic-documentation] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Extracting Latest Release Version From Github Ref | |
run: | | |
GITHUB_REF=${{ github.ref }} | |
echo "GITHUB_REF: ${GITHUB_REF}" | |
echo "SPECMATIC_LATEST_RELEASE_VERSION=${GITHUB_REF#refs/tags/}" | |
echo "SPECMATIC_LATEST_RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
- name: Repository Dispatch | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.SPECMATIC_CORE_VERSION_UPDATE_TOKEN }} | |
repository: ${{ matrix.repository }} | |
event-type: specmatic-core-release | |
client-payload: '{"latest-release": "${{ env.SPECMATIC_LATEST_RELEASE_VERSION }}"}' |