diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml deleted file mode 100644 index 2032487a50..0000000000 --- a/.github/workflows/release-tag.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Create Release Tag - -on: - push: - tags: - - 'v*' - -jobs: - release-tag: - runs-on: ubuntu-latest - 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' - - - name: Install dependencies - run: pnpm install - - - name: Generate Changlog - run: pnpm changelog - - - name: Create Release Tag - id: release_tag - uses: ncipollo/release-action@v1 - with: - bodyFile: '.github/changelog.md' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..14a21021fa --- /dev/null +++ b/.github/workflows/release.yml @@ -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'