Skip to content

Commit

Permalink
🐎 ci: release workflow test
Browse files Browse the repository at this point in the history
  • Loading branch information
kiccer committed Apr 7, 2024
1 parent 854fb63 commit e9be99b
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 10 deletions.
41 changes: 32 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,40 @@
# 根据 tag 自动创建发行版
name: Create Release
# name: Main
name: Create Tag and Release

on:
push:
tags:
- "v*.*.*"
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14

- name: Install dependencies
run: npm ci

- name: Get version
id: package
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"

- name: Create Tag
run: git tag ${{ steps.package.outputs.version }}

- name: Push Tag
run: git push origin ${{ steps.package.outputs.version }}

- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.package.outputs.version }}
release_name: Release ${{ steps.package.outputs.version }}
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "ui-forge",
"version": "0.0.1-alpha.2",
"version": "0.0.1-alpha.3",
"description": "通过对三方UI组件二次封装,提高使用效率。",
"author": "kiccer",
"license": "MIT",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down Expand Up @@ -44,6 +47,14 @@
"sass": "^1.74.1",
"vue": "^3.4.21"
},
"repository": {
"type": "git",
"url": "https://github.com/kiccer/ui-forge"
},
"bugs": {
"url": "https://github.com/kiccer/ui-forge/issues"
},
"homepage": "https://kiccer.github.io/ui-forge/",
"main": "src/index.js",
"files": [
"src/index.js",
Expand Down

0 comments on commit e9be99b

Please sign in to comment.