Release Manually #25
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
# .github/workflows/release-manually.yml | |
name: Release Manually | |
permissions: write-all | |
on: | |
workflow_dispatch: | |
jobs: | |
gradle: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v3 | |
- name: Set Env | |
run: | | |
VER=$(cat build.gradle.kts | grep "version =" | sed s/version\ =\ //g | sed s/\"//g) | |
echo "RELEASE_VERSION=v${VER}" >> $GITHUB_ENV | |
- name: Test Env | |
run: | | |
echo $RELEASE_VERSION | |
echo ${{ env.RELEASE_VERSION }} | |
[[ ${{ env.RELEASE_VERSION }} == v* ]] || exit 1 | |
- name: Gradle Wrapper Validation | |
uses: gradle/[email protected] | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Build with Gradle | |
run: | | |
chmod +x ./gradlew | |
./gradlew buildPlugin | |
- name: Create Release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
title: "Stable version: ${{ env.RELEASE_VERSION }}" | |
files: ./build/mirai/*.jar |