Skip to content

Commit

Permalink
feat(ci): add release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu committed Jan 25, 2024
1 parent d8c38a9 commit 148479b
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 33 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/release-tag.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release v4

on:
push:
tags:
- 'v4*'

jobs:
release-v4:
if: github.repository == 'jdf2e/nutui'
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install pnpm
run: corepack enable

- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: pnpm install

- name: Build NutUI Vue
run: pnpm build

- name: Publish NutUI Vue
run: pnpm --dir ./publish/nutui publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true

- name: Build NutUI Vue Taro
run: pnpm build:taro

- name: Publish NutUI Vue Taro
run: pnpm --dir ./publish/nutui-taro publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true

- name: Generate Changlog
run: pnpm changelog

- name: Create Release Tag
id: release_tag
uses: ncipollo/release-action@v1
with:
bodyFile: '.github/changelog.md'

0 comments on commit 148479b

Please sign in to comment.