-
Notifications
You must be signed in to change notification settings - Fork 21
42 lines (42 loc) · 1.39 KB
/
publish-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
name: Release a new version
on:
pull_request:
types: [ closed ]
branches: [ main ]
jobs:
release:
if: github.event.pull_request.merged == true && github.head_ref == 'release'
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.16.0-chrome105-ff104-edge
# https://github.com/cypress-io/github-action#firefox Cypress FF image needs this user permissions to be able to install dependencies
options: --user 1001
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Install lerna and all packages
run: npm ci
- name: Run linter in all packages
run: npm run lint
- name: Run tests in all packages
run: npm run test
- name: Configure git user
run: |
git config --local user.email "[email protected]"
git config --local user.name "empathy/x"
- name: Configure npm auth
run: |
npm config set registry="https://registry.npmjs.org/"
npm config set _authToken=${NPM_TOKEN}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish the release
run: npm run publish-release
- name: Push tags
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.SUPPORT_TOKEN }}
branch: ${{ github.ref }}
tags: true