feat(ci): Added release step for tag

Skip compress process for PR build
Add commit message check
Add release-note
This commit is contained in:
Yuxing Deng
2024-07-18 10:29:27 +08:00
parent 979b4991fa
commit 896e03e279
5 changed files with 81 additions and 21 deletions

View File

@@ -1,18 +1,21 @@
name: pull request
on:
pull_request:
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
jobs:
pr-build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
steps:
- name: Checkout
uses: actions/checkout@v4
-
name: Build to test
with:
fetch-depth: 0
- name: Commitsar check
uses: aevea/commitsar@v0.20.2
- name: Build to test
env:
SKIP_COMPRESS: "true"
run: make ci

View File

@@ -13,6 +13,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to Aliyun ACR
uses: docker/login-action@v3
with:
@@ -35,7 +37,9 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
env:
CROSS: tag
run: make github_ci
run: |
make github_ci
make release-note
- name: Prepare for packaging image
run: cp dist/* package/
@@ -68,3 +72,10 @@ jobs:
context: package
push: true
if: ${{ env.ALIYUN == 'true' }}
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/*
body_path: dist/release-note
draft: true