-
Notifications
You must be signed in to change notification settings - Fork 21
64 lines (53 loc) · 1.98 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
57
58
59
60
61
62
63
64
name: Release a new version
on: [workflow_dispatch]
jobs:
release:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node-18.16.0-chrome-112.0.5615.121-1-ff-112.0.1-edge-112.0.1722.48-1
# 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:
# Use GitHub App token as a workaround to allow bypassing branch-protection rules
# https://github.com/orgs/community/discussions/13836#discussioncomment-8535364
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.GH_TOKENS_APP_ID }}
private-key: ${{ secrets.GH_TOKENS_APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0
# Install pnpm because it is not included in our container image
- name: install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: install dependencies
run: pnpm install
- name: lint packages
run: pnpm run lint
- name: Run tests
run: pnpm run test:unit
- name: Run e2e tests
timeout-minutes: 15
uses: ./.github/actions/run-e2e-tests
- 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 //registry.npmjs.org/:_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: ${{ steps.app-token.outputs.token }}
branch: ${{ github.ref }}
tags: true