Publish Latest Snapshot #35
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: Publish Latest Snapshot | |
on: workflow_dispatch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 8 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Get date | |
run: echo "DATE=$(date --rfc-3339=date)" >> ${GITHUB_ENV} | |
- name: Set Minecraft Version | |
run: echo "MINECRAFT_VERSION=${GITHUB_REF##*/}" >> ${GITHUB_ENV} | |
- name: Build jar | |
run: ./gradlew build | |
env: | |
BUILD_SNAPSHOT: true | |
BUILD_ID: ${{env.DATE}} | |
- name: Upload assets to GitHub | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "${{env.MINECRAFT_VERSION}}-latest-snapshot" | |
prerelease: true | |
title: Development Build ${{env.DATE}} | |
files: | | |
build/libs/* |