Merge branch 'refs/heads/dev' #27
Workflow file for this run
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
# 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: Release tagged build | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set release version | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '8' | |
distribution: 'adopt' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Setup the workspace | |
run: ./gradlew setupCIWorkspace | |
- name: Publish to Maven, Modrinth, and CurseForge | |
run: ./gradlew publish | |
env: | |
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }} | |
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }} | |
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | |
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} | |
- name: Release under current tag | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "${{ env.RELEASE_VERSION }}" | |
prerelease: false | |
title: "${{ env.RELEASE_VERSION }}" | |
files: build/libs/*.jar |