🔖 [RELEASE] Modules: components, release #248
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
name: 'Build rewrite' | |
on: | |
push: | |
branches: [ rewrite ] | |
pull_request: | |
branches: [ rewrite ] | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
jobs: | |
# Only if last commit does not contain [RELEASE] | |
check: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Get Last Commit | |
run: | | |
$tmp = git show --pretty=format:"%s" -s HEAD | |
Write-Output "::set-env name=CommitMessage::$tmp" | |
shell: pwsh | |
- name: Check Last Commit | |
id: check_commit | |
run: | | |
if ($env:CommitMessage -match '\[RELEASE\]') { | |
echo "::set-output name=executable::true" | |
} else { | |
echo "::set-output name=executable::false" | |
} | |
shell: pwsh | |
outputs: | |
executable: ${{ steps.check_commit.outputs.executable }} | |
build: | |
runs-on: windows-latest | |
needs: check | |
if: ${{ needs.check.outputs.executable == 'false' }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew build -x test -x processCSS |