Skip to content

Commit

Permalink
chore: add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
suyalcinkaya committed May 7, 2024
1 parent e6d76fa commit 9fe356b
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 3 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
auto-install-peers = true
registry=https://registry.npmjs.org/
engine-strict=true
auto-install-peers=true
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9fe356b

Please sign in to comment.