Skip to content

Create README.md

Create README.md #24

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# 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.
name: VCMI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create Tag
id: create_tag
run: echo "RELEASE_TAG=$(date +'%Y-%m-%d-%H-%M')" >> $GITHUB_ENV
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Find JAR File
id: find_jar
run: echo "JAR_PATH=$(ls /home/runner/work/VCMI/VCMI/target/VCMI-*.jar)" >> $GITHUB_ENV
- name: Upload Artifacts
uses: actions/upload-artifact@v3.1.2
with:
name: VCMI
path: /home/runner/work/VCMI/VCMI/target/VCMI-*.jar
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_TAG }}
release_name: DEV ${{ env.RELEASE_TAG }}
draft: false
prerelease: true
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.JAR_PATH }}
asset_name: VCMI.jar
asset_content_type: application/java-archive