Skip to content

chore: add verify gradle samples build step #8

chore: add verify gradle samples build step

chore: add verify gradle samples build step #8

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
gradlevalidation:
name: "Validate Gradle Wrapper"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v4
build:
name: Validate samples
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
- name: Build and verify Gradle sample projects
run: |
cd examples/gradle
for x in $(find . -maxdepth 1 -type d -print); do
./gradlew -i create-rock
done
name: Build

Check failure on line 38 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 38
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
- name: Setup LXD
uses: canonical/setup-lxd@main
with:
channel: 5.21/candidate
- name: Setup rockcraft
run: |
sudo snap install rockcraft --classic
- name: Build and verify maven project
run: |
mvn install invoker:install invoker:run
- name: Build and verify gradle project
run: |
./gradlew clean build -i
- name: Publish Snapshots
if: github.ref == 'refs/heads/master'
run: |
# Find project version
ver=$(./gradlew properties -q | grep "version:" | awk '{print $2}')
# deploy if snapshot found
if [[ $ver == *"SNAPSHOT"* ]]
then
sudo snap install rockcraft --classic
lxd init --auto
./gradlew publish
fi
shell: bash