Skip to content

Commit

Permalink
feat:增加action配置
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkioTomas committed Oct 17, 2023
1 parent 9f5e3bd commit 2a4d3a4
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release

on:
push:
tags:
- 'v*'
permissions:
contents: write
pull-requests: write
jobs:
build-and-release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get tag name
id: get_tag
run: echo ::set-output name=tag_name::$(git describe --tags --abbrev=0)
- name: Remove "v" from tag name
id: remove_v
run: echo ::set-output name=tag_name_without_v::${{ steps.get_tag.outputs.tag_name#"v"}}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: mbstring
- name: Install dependencies with Yarn
run: |
chmod +x /src/cleanphp/release/clean
./src/cleanphp/release/clean release -v=${{ steps.remove_v.outputs.tag_name_without_v }} -n=vpay
./src/cleanphp/release/clean release -v=${{ steps.remove_v.outputs.tag_name_without_v }} -n=vpay_bt -f=build_bt.php
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v3
with:
commitMode: true
configuration: "configuration.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: mikepenz/action-gh-release@v0.2.0-a03 #softprops/action-gh-release
with:
body: ${{steps.github_release.outputs.changelog}}
files: |
dist/vpay_*.zip
54 changes: 54 additions & 0 deletions configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"categories": [
{
"title": "## 🚀 Features",
"labels": ["feat","feats"]
},
{
"title": "## \uD83C\uDF1F Optimizes",
"labels": ["pref"]
},
{
"title": "## 🐛 Fixes",
"labels": ["bug","fix"]
},
{
"title": "## 🧪 Tests",
"labels": ["🧪","test","tests"]
},
{
"title": "## 💬 Other",
"labels": ["💬", "🚨","other"]
},
{
"title": "## \uD83D\uDCD6 Docs",
"labels": ["doc","docs"]
},
{
"title": "## 📦 Dependencies",
"labels": ["dependencies","deps"]
}
],
"template": "${{CHANGELOG}}",
"pr_template": "- **${{TITLE}}**",
"label_extractor": [
{
"pattern": "(\\w+):(.+)",
"target": "$1",
"on_property": "title"
}
],
"transformers": [
{
"pattern": "(\\w+):(.+)",
"target": "$2"
}
],
"duplicate_filter": {
"pattern": ".+",
"on_property": "title",
"method": "match"
},
"max_pull_requests": 1000,
"max_back_track_time_days": 1000
}

0 comments on commit 2a4d3a4

Please sign in to comment.