-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (50 loc) · 1.67 KB
/
autopublish.yml
File metadata and controls
63 lines (50 loc) · 1.67 KB
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
55
56
57
58
59
60
61
62
63
name: Publish new version
on:
push:
branches:
- master
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: reattach HEAD
run: |
git checkout "${GITHUB_REF:11}"
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: |
yarn install --frozen-lockfile --ignore-engines
- name: Configure Git User
run: |
git config --local user.email dmitriy.chekin@csssr.io
git config --local user.name csssr-team
- name: Configure commits signing
run: |
export GPG_TTY=$(tty)
echo -e "$GPG_PRIVATE_KEY" | gpg --batch --import
echo "" | gpg --clearsign --passphrase $GPG_PASSPHRASE --pinentry-mode loopback
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: npm whoami (debug)
run: npm whoami
- name: Publish new version if required
run: |
yarn lerna version --conventional-commits --allow-branch=master --no-changelog --sign-git-commit --sign-git-tag --no-push --yes
yarn release
- name: Push changes
run: |
git remote add pub https://csssr-team:${{ secrets.GITHUB_TOKEN }}@github.com/csssr-dreamteam/core-design.git
git push pub HEAD:master --follow-tags --no-verify