Skip to content

build: 发布 1.5.6 版本 #30

build: 发布 1.5.6 版本

build: 发布 1.5.6 版本 #30

# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Auto Release Jar To Maven
on:
push:
tags: [ v* ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Release Jar To Maven
env: # Or as an environment variable
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_password: ${{ secrets.GPG_PASSWORD }}
ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
# build.gradle 脚本中已支持直接从环境变量中读取相关配置信息,因此这里可以不显式传递相关机密参数
run: ./gradlew publish
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false