-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (40 loc) · 1.14 KB
/
publish.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
name: "Build / Publish"
on:
push:
branches: [main, beta]
pull_request:
branches: [main, beta]
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 18.x
- name: Install dependencies
run: npx ci
- name: Install semantic-release extra plugins
run: npm install --save-dev @semantic-release/changelog @semantic-release/git
- name: Build
run: npm run build
- name: Test
run: npm run test
- name: Create .npmrc file
run: |
echo registry=https://registry.npmjs.org/ > .npmrc
echo @uzenith360:registry=https://npm.pkg.github.com/ > .npmrc
echo '//npm.pkg.github.com/:_authToken=${{ secrets.GH_TOKEN }}' >> .npmrc
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPMAUTHTOKEN }}
run: npx semantic-release