-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (45 loc) · 1.39 KB
/
release.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
##.github/workflows/release.yml
name: Release & Publish to NPM
on: workflow_dispatch
permissions:
actions: write
contents: write
pull-requests: write
statuses: write
pages: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- run: ./ci
- name: Prepate git remote
run: |
git remote set-url origin git@github.com:kullna/editor.git
- name: Prepate for Auth with GitHub to create release
run: |
git config --global user.email "StevenEWright@users.noreply.github.com"
git config --global user.name "Steven E Wright"
- name: Prepare Git to use SSH Key
uses: webfactory/ssh-agent@v0.5.4
with:
ssh-private-key: ${{ secrets.GIT_SSH_PRIVATE_KEY }}
- name: Prepare for Auth with NPM
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Run release
run: npm run release --ci
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./website gen
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './docs/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2