-
Notifications
You must be signed in to change notification settings - Fork 39
47 lines (38 loc) · 1.2 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
46
47
name: Release
on: workflow_dispatch
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
- name: Install
run: yarn install
- name: Build
run: yarn build
- name: Bump Version
env:
GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no"
GITHUB_SSH_KEY: ${{ secrets.GITHUB_SSH_KEY }}
run: |
eval "$(ssh-agent -s)"
ssh-add - <<< "${GITHUB_SSH_KEY}"
git config --global user.email "bellstrand@gmail.com"
git config --global user.name "Magnus Bellstrand"
git config --global pull.ff only
git remote remove origin
git remote add origin "git@github.com:${GITHUB_REPOSITORY}.git"
git fetch
git checkout master
git pull origin master
npx standard-version
git push --follow-tags origin master
- name: Publish NPM package
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
npm publish --access public