Build #982
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 | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 4 * * *' | |
jobs: | |
build: | |
name: Build & Deploy | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'zulu' | |
cache: 'maven' | |
- name: Build with Maven | |
run: mvn --batch-mode --update-snapshots clean install | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: JARs | |
path: target/*.jar | |
- name: Notify discord | |
if: always() && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository_owner == 'vlingo' | |
uses: 'Ilshidur/[email protected]' | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
DISCORD_USERNAME: Bob the Builder | |
DISCORD_EMBEDS: '[{"title":"Build ${{ job.status }}", "description":"[${{ github.repository }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})","author": { "icon_url": "https://avatars.githubusercontent.com/${{ github.actor }}", "name": "${{ github.actor }}", "url": "${{ github.server_url }}/${{ github.actor }}"},"color":"${{ job.status == ''success'' && ''65280'' || ''16711680'' }}"}]' | |
- name: Cleanup | |
run: rm -rf ~/.m2/repository/io/vlingo |