From 9fe356b0419a03c588cb32450e4c52533b08bfe3 Mon Sep 17 00:00:00 2001 From: suyalcinkaya Date: Wed, 8 May 2024 01:51:46 +0200 Subject: [PATCH] chore: add release workflow --- .github/workflows/release.yaml | 36 ++++++++++++++++++++++++++++++++++ .npmrc | 4 +++- package.json | 3 +-- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..abff866 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,36 @@ +name: Release + +on: + workflow_dispatch: + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20.x + + - name: Install Dependencies + run: pnpm i + + - name: Publish to NPM + id: changesets + uses: changesets/action@v1 + with: + publish: pnpm publish-packages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.npmrc b/.npmrc index 1560b99..cff4d40 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,3 @@ -auto-install-peers = true \ No newline at end of file +registry=https://registry.npmjs.org/ +engine-strict=true +auto-install-peers=true \ No newline at end of file diff --git a/package.json b/package.json index 01b278c..29ce094 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,7 @@ "clean": "turbo clean && rm -rf node_modules", "format": "prettier --write \"**/*.{ts,tsx,md}\"", "changeset": "changeset", - "version-packages": "changeset version", - "release": "turbo build --filter=packages^... && changeset publish" + "publish-packages": "turbo run build --filter=@suyalcinkaya/gauge && changeset version && changeset publish" }, "devDependencies": { "@changesets/cli": "^2.27.1",