-
-
Notifications
You must be signed in to change notification settings - Fork 65
97 lines (90 loc) · 3.54 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# name: release to github
# on:
# push:
# tags:
# - "*.*.*"
# jobs:
# doc:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: 'Get Previous tag'
# id: previoustag
# uses: "WyriHaximus/github-action-get-previous-tag@v1"
# - name: 'Get previous release tag'
# id: tag
# uses: "sammcoe/get-previous-release-action@v1"
# - name: replace version
# run: sed -i "s/${{steps.tag.outputs.tag}}/${{steps.previoustag.outputs.tag}}/g" README*.md
# - name: Create Pull Request
# id: cpr
# uses: peter-evans/create-pull-request@v4
# with:
# commit-message: Update README file.
# author: GitHub <[email protected]>
# signoff: false
# branch: doc/${{steps.previoustag.outputs.tag}}
# labels: document
# base: main
# delete-branch: true
# title: 'doc: update README files version to ${{steps.previoustag.outputs.tag}}'
# body: |
# **在提出此拉取请求时,我确认了以下几点(保存后请点击复选框):**
# - [x] 标题为fix、feat或doc开头
# - [x] 我已检查没有与此请求重复的拉取请求。
# - [x] 我已经考虑过,并确认这份呈件对其他人很有价值。
# - [x] 我接受此提交可能不会被使用,并根据维护人员的意愿关闭拉取请求。
# **填写PR内容:**
# - Update README files version to latest tag by bot 🚀.
# draft: false
# - name: Auto approve
# if: steps.cpr.outputs.pull-request-operation == 'created'
# uses: juliangruber/approve-pull-request-action@v1
# with:
# github-token: ${{ secrets.PAT }}
# number: ${{ steps.cpr.outputs.pull-request-number }}
# - id: automerge
# name: automerge
# uses: "pascalgn/[email protected]"
# env:
# MERGE_LABELS: "document"
# MERGE_DELETE_BRANCH: true
# GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# PULL_REQUEST: ${{ steps.cpr.outputs.pull-request-number }}
# MERGE_RETRIES: 18
# MERGE_RETRY_SLEEP: 10000
# release:
# needs: doc
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: 'Get Previous tag'
# id: previoustag
# uses: "WyriHaximus/github-action-get-previous-tag@v1"
# - name: replace version
# run: sed -i "s/SONIC_VERSION/${{ steps.previoustag.outputs.tag }}/g" pom.xml
# - name: Set up Maven Central Repo
# uses: actions/setup-java@v1
# with:
# java-version: 1.8
# server-id: sonatype-nexus-staging
# server-username: ${{ secrets.OSSRH_USER }}
# server-password: ${{ secrets.OSSRH_PASSWORD }}
# gpg-passphrase: ${{ secrets.GPG_PASSWORD }}
# - name: Release Maven package
# uses: WasiqB/maven-publish-action@v1
# with:
# maven_args: -Dmaven.test.skip=true
# gpg_private_key: ${{ secrets.GPG_SECRET }}
# gpg_passphrase: ${{ secrets.GPG_PASSWORD }}
# nexus_username: ${{ secrets.OSSRH_USER }}
# nexus_password: ${{ secrets.OSSRH_PASSWORD }}
# - uses: softprops/action-gh-release@v1
# with:
# draft: false
# generate_release_notes: true
# # mvn clean deploy -Pdeploy -Dmaven.test.skip=true