-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (52 loc) · 1.84 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
45
46
47
48
49
50
51
52
53
54
name: Publish
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
node-version: [16.x]
steps:
- name: 👉🏼 Checkout
uses: actions/checkout@v2
with:
# pulls all commits (needed for lerna / semantic release to correctly version) — see https://github.com/lerna/lerna/issues/2542
fetch-depth: 0
- name: 🤖 Git Bot Identity
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
- name: 📦️ Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
scope: '@mifiel'
- name: 🚚 Install dependencies
run: yarn install
- name: 👷 Build packages
run: yarn build
- name: 🔖 Release New Version
run: yarn release:version --yes
- uses: actions/setup-node@v2
with:
registry-url: https://npm.pkg.github.com
scope: '@mifiel'
- name: 📦 Publish to Github Packages
run: yarn release:publish from-package --no-verify-access --registry https://npm.pkg.github.com --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v2
with:
registry-url: https://registry.npmjs.org
scope: '@mifiel'
- name: 📦 Publish to NPM
run: yarn release:publish from-package --no-verify-access --registry https://registry.npmjs.org --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}