ci(release): 👷 🚀 add changeset release workflow
This commit is contained in:
33
.github/workflows/release.yml
vendored
Normal file
33
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: 🎉 Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
jobs:
|
||||
release:
|
||||
if: github.repository == 'loreddev/marknow'
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup environment
|
||||
uses: ./.github/actions/pnpm-setup
|
||||
- name: Create Release PR or Public to NPM
|
||||
id: changesets
|
||||
uses: changesets/action@v1
|
||||
with:
|
||||
publish: pnpm release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
@@ -14,8 +14,10 @@
|
||||
"lint": "eslint . && turbo run lint",
|
||||
"lint:fix": "eslint . --fix && turbo run lint -- --fix",
|
||||
"build": "turbo run build --filter=\"@marknow/www\"",
|
||||
"build:pkg": "turbo run build --filter='./packages/*'",
|
||||
"dev": "turbo run dev --filter=\"@marknow/www\"",
|
||||
"preview": "turbo run preview --filter=\"@marknow/www\""
|
||||
"preview": "turbo run preview --filter=\"@marknow/www\"",
|
||||
"release": "pnpm run build:pkg && changesets publish"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^0.39.5",
|
||||
|
||||
Reference in New Issue
Block a user