Skip to content

Commit d3e1fbc

Browse files
authored
ci: create release workflow (#127)
1 parent 9c84741 commit d3e1fbc

File tree

4 files changed

+46
-6
lines changed

4 files changed

+46
-6
lines changed

.config/release-it.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type { Config } from "release-it";
2+
3+
export default {
4+
git: {
5+
commitArgs: ["--no-verify"],
6+
},
7+
} satisfies Config;

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
lint:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- name: Checkout
20+
- name: Checkout Repository
2121
uses: actions/checkout@v4
2222

2323
- name: Setup
@@ -32,7 +32,7 @@ jobs:
3232
test:
3333
runs-on: ubuntu-latest
3434
steps:
35-
- name: Checkout
35+
- name: Checkout Repository
3636
uses: actions/checkout@v4
3737

3838
- name: Setup
@@ -44,7 +44,7 @@ jobs:
4444
build-library:
4545
runs-on: ubuntu-latest
4646
steps:
47-
- name: Checkout
47+
- name: Checkout Repository
4848
uses: actions/checkout@v4
4949

5050
- name: Setup
@@ -59,7 +59,7 @@ jobs:
5959
build-web:
6060
runs-on: ubuntu-latest
6161
steps:
62-
- name: Checkout
62+
- name: Checkout Repository
6363
uses: actions/checkout@v4
6464

6565
- name: Setup
@@ -78,7 +78,7 @@ jobs:
7878
build-ios-dev:
7979
runs-on: macos-15
8080
steps:
81-
- name: Checkout
81+
- name: Checkout Repository
8282
uses: actions/checkout@v4
8383

8484
- name: Setup

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release & Publish to NPM
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout Repository
10+
uses: actions/checkout@v4
11+
12+
- name: Setup
13+
uses: ./.github/actions/setup
14+
15+
- name: Initialize Git user
16+
shell: bash
17+
run: |
18+
git config user.name "github-actions"
19+
git config user.email "mwlawlor@gmail.com"
20+
21+
- name: Setup NPM registry
22+
run: |
23+
npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
24+
env:
25+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
26+
27+
- name: Run release
28+
run: |
29+
yarn release --ci --preRelease --dry-run
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,5 @@ nitrogen/
8585
# generated by bob
8686
dist/
8787

88-
.env
88+
.env
89+
.npmrc

0 commit comments

Comments
 (0)