Skip to content

chore: test git action params #26

chore: test git action params

chore: test git action params #26

Workflow file for this run

# 工作流名称
name: Build and Deploy
on:
# 指明要运行的分支,跟上面配置保持一致
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
# 把分支拉出来
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
# 指定node版本
- name: Set node version
uses: actions/setup-node@v2
with:
node-version: "18"
- name: Pick up version
id: version
run: echo ::set-output name=value::$(date +%Y%m%d%H%M%S)
- name: Console the version
run: echo ${{steps.version.outputs.value}}
- name: Pick the repository name
id: repository_name
run: echo ::set-output name=value::$(basename "${{ github.repository }}")
- name: Console the repository name & version
run: echo ${{steps.repository_name.outputs.value}}
# 安装依赖,包括我们的 semantic-release 全套
- name: Install
run: |
npm install
# 执行 semantic-release 发布包
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release