Skip to content

Use official GH action #96

Use official GH action

Use official GH action #96

Workflow file for this run

name: Tower Agent continuous build
on:
push:
branches:
- '*'
- '!refs/tags/.*'
tags-ignore:
- '*'
jobs:
linux-image:
name: Linux
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Environment
run: env | sort
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Setup Graalvm
uses: graalvm/setup-graalvm@v1

Check failure on line 27 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 27
with:
java-version: 17
distribution: 'graalvm'
components: 'native-image'
native-image-musl: 'true'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Tests
run: ./gradlew cleanTest test
- name: Tests reports
uses: actions/upload-artifact@v2
if: failure()
with:
name: linux-test-reports
path: build/reports/tests/test/
- name: Build Native Image
run: ./gradlew nativeCompile
- name: Build fat JAR
run: ./gradlew shadowJar
- name: Upload linux native image artifact
uses: actions/upload-artifact@v2
with:
name: tw_agent_linux
path: build/native/nativeCompile/tw-agent
- name: Upload fat JAR artifact
uses: actions/upload-artifact@v2
with:
name: tw_agent_jar
path: build/libs/tw-agent.jar
release:
name: Release
if: "contains(github.event.head_commit.message, '[release]') && github.event.ref=='refs/heads/master'"
needs: [ linux-image ]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download all build artifacts
uses: actions/download-artifact@v2
- name: Setup Java for JReleaser
uses: actions/setup-java@v1
with:
java-version: 17
- name: Version
id: version
run: |
VERSION=$(cat ./VERSION)
echo "VERSION = $VERSION"
echo "::set-output name=VERSION::$VERSION"
- name: Run JReleaser
uses: jreleaser/release-action@v1
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_PROJECT_VERSION: ${{ steps.version.outputs.VERSION }}