Skip to content

Commit

Permalink
ci(release): change semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
wood3n committed Mar 13, 2024
1 parent b988308 commit 5ed6dec
Show file tree
Hide file tree
Showing 7 changed files with 202 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = {
sourceType: 'module',
ecmaVersion: 'latest',
alwaysTryTypes: true,
project: ['**/tsconfig.json', './packages/*/tsconfig.json'],
project: ['./tsconfig.base.json', './packages/*/tsconfig.json'],
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Rspress site to Pages
name: Deploy website to github-pages

on:
push:
Expand Down
45 changes: 30 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Publish and Release
on:
push:
branches:
Expand All @@ -8,29 +8,44 @@ permissions:
contents: read # for checkout

jobs:
release:
name: Release
# build
build:
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
fetch-depth: 0 # Not needed if lastUpdated is not enabled
- uses: pnpm/action-setup@v2 # pnpm is optional but recommended, you can also use npm / yarn
with:
version: 6
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
node-version: 20
cache: pnpm
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: npm clean-install
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
run: pnpm install
- name: Build packages
run: pnpm build

# publish and release
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: pnpm publish --filter ./packages/*
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
run: pnpm --filter ./packages/* --workspace-concurrency=1 exec -- npx --no-install semantic-release -e semantic-release-monorepo
6 changes: 0 additions & 6 deletions .releaserc

This file was deleted.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"dev": "pnpm --filter @react-filter/core run dev",
"dev:antd": "pnpm --filter @react-filter/antd run dev",
"dev:website": "pnpm --filter website run dev",
"build": "pnpm --filter \"./packages/**\" run build",
"build:antd": "pnpm --filter @react-filter/antd run build",
"build:website": "pnpm --filter website run build",
"ci:publish": "pnpm publish -r",
Expand Down Expand Up @@ -57,6 +58,7 @@
"lint-staged": "^15.0.2",
"prettier": "^3.0.3",
"semantic-release": "^23.0.2",
"semantic-release-monorepo": "^8.0.2",
"stylelint": "^15.11.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-prettier": "^4.0.2",
Expand Down
Loading

0 comments on commit 5ed6dec

Please sign in to comment.