Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-fokin committed Oct 18, 2023
1 parent eb6ea89 commit 95c7df9
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 47 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build-use-jar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: Build USE jar

on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
# "You can make an environment variable available to any subsequent steps in a workflow job by
# defining or updating the environment variable and writing this to the GITHUB_ENV environment file."
- name: Set environment variables
run: |
echo VERSION="$(date +%Y).$(date +%-m)" >> $GITHUB_ENV
echo DOCKER_TAG="$(date +%Y).$(date +%-m).$(date +%-d)-$(echo -n ${GITHUB_SHA} | cut -c 1-7)" >> $GITHUB_ENV
- name: Print environment variables
run: printenv

- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.4.2
arguments: :utbot-light:build -x test

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: utbot-light-${{ env.VERSION }}
path: utbot-light/build/libs/*
47 changes: 0 additions & 47 deletions .github/workflows/gradle-publish.yml

This file was deleted.

0 comments on commit 95c7df9

Please sign in to comment.