Skip to content

Commit

Permalink
Merge pull request #85 from Luozf12345/feature/yml_test
Browse files Browse the repository at this point in the history
Feature/yml test
  • Loading branch information
Luozf12345 authored Mar 29, 2024
2 parents 3184b97 + 208dd01 commit 0240a07
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 0 deletions.
103 changes: 103 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Auto Release

on:
pull_request:
branches: [develop, feature/actions, main]
# types: [opened, synchronize, reopened, closed]
# paths:
# - "package.json"
# push:
# branches: [main,develop, feature/auto-release]
# types: [opened, synchronize, reopened, closed]
# paths:
# - "package.json"
# issue_comment:
# types: [edited]

jobs:
# generator:
# runs-on: ubuntu-latest
# if: >
# github.event_name == 'pull_request' &&
# github.event.pull_request.merged == false &&
# startsWith(github.head_ref, 'release/')
# steps:
# - run: echo "The head of this PR starts with 'release/'"
# - uses: actions/checkout@v3
# - uses: 94dreamer/auto-release@develop
# id: changelog
# env:
# GITHUB_TOKEN: ${{ secrets.TD_FLUTTER }}
# - name: Add comment
# uses: peter-evans/create-or-update-comment@v1
# with:
# issue-number: ${{ github.event.pull_request.number }}
# body: |
# ${{ steps.changelog.outputs.changelog }}
comment_add_log:
runs-on: ubuntu-latest
# if: >
# github.event_name == 'issue_comment'
# && github.event.issue.pull_request
# && github.event.sender.login == github.event.issue.user.login
# && startsWith(github.event.comment.body, '## 🌈 ')
steps:
- id: comment
shell: bash
run: |
echo "github event:${{github}}"
echo "github.event_name:${{github.event_name}}"
echo "github.event:${{github.event}}"
echo "github.event.issue:${{github.event.issue}}"
echo "github.event.issue.pull_request:${{github.event.issue.pull_request}}"
echo "github.event.sender:${{github.event.sender}}"
echo "github.event.sender.login:${{github.event.sender.login}}"
echo "github.event.comment:${{github.event.comment}}"
echo "github.event.comment.body:${{github.event.comment.body}}"
# result=$(curl ${{github.event.issue.pull_request.url}} -H "Authorization: token ${{ secrets.TD_FLUTTER }}")
# headrefreg='"ref": "(release/[[:digit:]]{1,2}\.[[:digit:]]{1,2}\.[[:digit:]]{1,2})",'
# if [[ $result =~ $headrefreg ]]
# then
# echo "属于 release pr 的 comment ${BASH_REMATCH[1]}"
# else
# echo "不属于 release pr 的 comment" && exit 1
# fi
# echo "::set-output name=branch::${BASH_REMATCH[1]}"
# zsh $match[1]
- uses: actions/checkout@v3
with:
ref: ${{ steps.comment.outputs.branch }}
- name: Commit and push if needed
env:
BODY: ${{ github.event.comment.body }}
run: |
txt=$(cat CHANGELOG.md)
echo "${txt%%##*}$BODY${txt##*---}" > CHANGELOG.md
git add .
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "chore: changelog's changes"
git push
echo "💾 pushed changelog's changes"
# merge_tag:
# runs-on: ubuntu-latest
# if: >
# github.event_name == 'pull_request' &&
# github.event.pull_request.merged == true &&
# startsWith(github.head_ref, 'release/')
# steps:
# - uses: actions/checkout@v3
# with:
# ref: develop
# token: ${{ secrets.PERSONAL_TOKEN }}
# - name: tag and push if needed
# run: |
# data=$(cat package.json)
# re="\"version\": \"([^\"]*)\""
# [[ $data =~ $re ]]
# echo "${BASH_REMATCH[1]}"
# git config --local user.email "github-actions[bot]@users.noreply.github.com"
# git config --local user.name "github-actions[bot]"
# git tag ${BASH_REMATCH[1]}
# git push origin ${BASH_REMATCH[1]}
# echo "pushed tag ${BASH_REMATCH[1]}"
1 change: 1 addition & 0 deletions tdesign-component/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# TODO: 测试内容,记得删掉
version: 1.0.0+1

environment:
Expand Down

0 comments on commit 0240a07

Please sign in to comment.