-
Notifications
You must be signed in to change notification settings - Fork 9
61 lines (51 loc) · 1.37 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Deployment Workflow
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
name: "@mindfiredigital/react-text-igniter"
runs-on: ubuntu-latest
permissions:
contents: write
packages: read
steps:
- name: "Checkout repository"
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: "Install dependencies"
run: npm install
- name: "Build application"
run: npm run build
- name: "Restore changes in json"
run: |
git restore package-lock.json
- name: "Set Git user name and email"
run: |
git config --local user.email "github-actions@github.com"
git config --local user.name "GitHub Actions"
create-github-release:
name: Create Github release document and publish to node
runs-on: ubuntu-latest
permissions:
contents: write
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Semantic Release and npm release
run: |
npm ci
npx semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}