Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(CI): use new release workflow #1686

Merged
merged 2 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 0 additions & 87 deletions .github/workflows/bench-pr.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/issue-label.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .github/workflows/release-nightly.yml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/release-pull-request-with-modernjs.yml

This file was deleted.

63 changes: 0 additions & 63 deletions .github/workflows/release-pull-request-without-modernjs.yml

This file was deleted.

42 changes: 14 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ name: Release
on:
workflow_dispatch:
inputs:
version:
npm_tag:
type: choice
description: 'Release Version(next, beta, alpha, latest)'
description: 'Specify npm tag'
required: true
default: 'next'
default: 'alpha'
options:
- next
- beta
- alpha
- beta
- rc
- canary
- latest
branch:
description: 'Release Branch(confirm release branch)'
description: 'Branch to release'
required: true
default: 'main'

Expand All @@ -26,11 +27,12 @@ jobs:
name: Release
if: github.repository == 'web-infra-dev/rspress' && github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 5
fetch-depth: 1

- name: Install Pnpm
run: corepack enable
Expand All @@ -44,28 +46,12 @@ jobs:
- name: Install npm v9
run: npm install -g npm@9

- name: Nx Cache
id: nx-cache
uses: actions/cache@v4
with:
path: .nx-cache
key: nx-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
nx-${{ github.ref_name }}-
nx-

- name: Install Dependencies && Build
run: pnpm install

- name: Release
uses: web-infra-dev/actions@v2
with:
version: ${{ github.event.inputs.version }}
branch: ${{ github.event.inputs.branch }}
type: 'release'
tools: 'changeset'
- name: Publish to npm
env:
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
REPOSITORY: ${{ github.repository }}
REF: ${{ github.ref }}
NPM_TOKEN: ${{ secrets.RSPRESS_NPM_TOKEN }}
run: |
npm config set "//registry.npmjs.org/:_authToken" "${NPM_TOKEN}"
pnpm -r publish --tag ${{ github.event.inputs.npm_tag }} --publish-branch ${{ github.event.inputs.branch }}
Loading
Loading