Skip to content

CASC Weekly Release #30

CASC Weekly Release

CASC Weekly Release #30

# 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 Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: CASC Weekly Release
on:
schedule:
- cron: "0 0 * * 1"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Jar built files with Gradle
run: ./gradlew jar
- name: Create release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ steps.version.outputs.version }}
tag_name: ${{ steps.date.outputs.date }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload Jar file to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/libs/CASC-0.0.1.jar
asset_name: CASC-Weekly-${{ steps.date.outputs.date }}.jar
asset_content_type: application/zip
- name: Publish Jar file
uses: actions/[email protected]
with:
# Artifact name
name: CASC-Weekly-${{ steps.date.outputs.date }}.jar
# A file, directory or wildcard pattern that describes what to upload
path: ./build/libs/CASC-0.0.1.jar
# The desired behavior if no files are found using the provided path.