Skip to content

Commit bb7cc57

Browse files
committed
add manual release workflow and update .gitignore
1 parent f895b90 commit bb7cc57

2 files changed

Lines changed: 65 additions & 0 deletions

File tree

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: 🚀 Manual Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_type:
7+
description: 'Release Type'
8+
required: true
9+
type: choice
10+
options:
11+
- patch
12+
- minor
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
19+
packages: write
20+
steps:
21+
- uses: actions/checkout@v3
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Setup Git
26+
run: |
27+
git config --global user.name 'GitHub Actions Bot'
28+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v3
32+
with:
33+
node-version: '18.x'
34+
registry-url: 'https://registry.npmjs.org'
35+
36+
- name: Install dependencies
37+
run: npm ci
38+
39+
- name: Create new version
40+
run: |
41+
npm version ${{ inputs.release_type }}
42+
43+
- name: Push changes
44+
run: |
45+
git push
46+
git push --tags
47+
48+
- name: Publish to NPM
49+
run: npm publish
50+
env:
51+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
52+
53+
- name: Create GitHub Release
54+
uses: softprops/action-gh-release@v1
55+
with:
56+
tag_name: v$(node -p "require('./package.json').version")
57+
generate_release_notes: true
58+
files: |
59+
dist/*
60+
LICENSE
61+
README.md
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,5 @@ dist
135135
.yarn/build-state.yml
136136
.yarn/install-state.gz
137137
.pnp.*
138+
139+
.DS_Store

0 commit comments

Comments
 (0)