ci(release): 👷 🚀 add changeset release workflow

This commit is contained in:
Guz013
2023-06-27 17:00:48 -03:00
parent a59350ad77
commit 744e38887a
2 changed files with 36 additions and 1 deletions

33
.github/workflows/release.yml vendored Normal file
View 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 }}

View File

@@ -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",