build: 发布 1.2.1 版本 #15
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 | |
# 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 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- 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 |