佛祖保佑 #40
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: "Pre-release" | |
on: | |
push: | |
branches: | |
- "main" | |
jobs: | |
pre-release: | |
name: "Pre-Release" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-maven- | |
- name: Build Jar file | |
run: mvn clean install | |
- name: Get commit SHA | |
run: echo "GITHUB_SHA_SHORT=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_ENV | |
- name: Release Jar file | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "${{ env.GITHUB_SHA_SHORT }}" | |
prerelease: true | |
title: 'Orange Dog dev-${{ env.GITHUB_SHA_SHORT }}' | |