-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1.15 KB
/
main.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
name: CD
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: Configure CI Git User
run: |
git config --global user.name '@cirocfc'
git config --global user.email 'ciro.cfc@gmail.com'
git remote set-url origin https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/cirocfc/yet-another
env:
GITHUB_TOKEN: ${{ secrets.GH_TK }}
- name: Checkout and pull branch
run: git checkout "${GITHUB_REF:11}" && git pull
- name: Install Packages
run: yarn install
- name: Authenticate with Registry
run: |
echo "@cirocfc:registry=http://registry.npmjs.org/" > .npmrc
echo "registry=http://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish package
run: yarn release
env:
GH_TOKEN: ${{ secrets.GH_TK }}
GITHUB_TOKEN: ${{ secrets.GH_TK }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}