From 744e38887a05df27730d6c9968a2b1d39bb25a94 Mon Sep 17 00:00:00 2001 From: Guz013 <43732358+Guz013@users.noreply.github.com> Date: Tue, 27 Jun 2023 17:00:48 -0300 Subject: [PATCH] =?UTF-8?q?ci(release):=20=F0=9F=91=B7=20=F0=9F=9A=80=20ad?= =?UTF-8?q?d=20changeset=20release=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ package.json | 4 +++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1bd04e5 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/package.json b/package.json index 52958a7..0ada154 100644 --- a/package.json +++ b/package.json @@ -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",