-
Notifications
You must be signed in to change notification settings - Fork 21
56 lines (47 loc) · 1.55 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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
# Install pnpm because it is not included in our container image
- name: install pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- name: install dependencies
run: pnpm install
- name: lint packages
run: pnpm run lint
- name: test packages
run: pnpm 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_GRANULAR_ACCESS }}
- name: publish the release
run: pnpm run publish-release
- name: push tags
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.SUPPORT_TOKEN }}
branch: ${{ github.ref }}
tags: true