Skip to content

Commit

Permalink
🐎 ci: 测试ci
Browse files Browse the repository at this point in the history
  • Loading branch information
hmydgz committed Jun 18, 2024
1 parent abd7265 commit ad20229
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci-test.action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI test

on:
push:
branches:
- ci-test

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: 安装 Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/

# - name: 获取版本号
# id: get_tag
# run: |
# TAG_NAME=${GITHUB_REF#refs/tags/}
# VERSION=${TAG_NAME#v}
# echo "VERSION=$VERSION" >> $GITHUB_ENV

# - name: 更新 NPM 版本号
# run: npm version $VERSION --no-git-tag-version
# env:
# VERSION: ${{ env.VERSION }}

- name: Configure git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Commit changes
run: |
git checkout origin/ci-test
git add package.json
git commit -m "Update version to $VERSION"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ env.VERSION }}

0 comments on commit ad20229

Please sign in to comment.