Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ghandic committed Aug 22, 2024
1 parent e8bb0af commit ae71449
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build

on:
push:
branches:
- "**" # matches every branch

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "18" # Specify your Node.js version
cache: "pnpm"
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.1.1
- name: Install dependencies
run: pnpm i

- name: Build the package
run: pnpm run build
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and Publish

on:
push:
tags:
- "v*"

jobs:
build-and-publish:
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "18" # Specify your Node.js version
cache: "pnpm"
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.1.1
- name: Install dependencies
run: pnpm i

- name: Build the package
run: pnpm run build

- name: Publish to npm
run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@slalombuild/react-mailto",
"version": "0.2.6",
"version": "0.2.7",
"exports": {
".": "./src/index.tsx"
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@slalombuild/react-mailto",
"version": "0.2.6",
"version": "0.2.7",
"publishConfig": {
"access": "public"
},
Expand Down

0 comments on commit ae71449

Please sign in to comment.