-
Notifications
You must be signed in to change notification settings - Fork 6
129 lines (103 loc) · 3.56 KB
/
Copy pathrelease.yml
File metadata and controls
129 lines (103 loc) · 3.56 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: RELEASE
on:
push:
branches:
- master
- canary
- dev
# paths-ignore:
# - 'www/**'
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
release:
if: ${{ contains(github.event.head_commit.message, 'release version') }}
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_BASE_URL: https://infinite-table.com/.netlify/functions/json-server
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: './.github/actions/will-release-check'
env:
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
- name: Echo whoami on public npm registry
run: npm whoami
- name: Echo publish cmd
run: echo $WILL_RELEASE_CMD
- name: Set git config
run: |
git config --local user.email "action@github.com"
git config --local user.name "SHIP IT"
- name: Install
run: npm ci
- name: Install examples
run: npm ci --prefix examples
- name: Get installed Playwright version
id: playwright-version
run: echo "::set-output name=version::$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')"
working-directory: examples
- name: Restore cached browser binaries for Playwright
id: playwright-restore
uses: actions/cache/restore@v4
with:
path: '~/.cache/ms-playwright'
key: '${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}'
- name: Install Playwright browsers
# this will not install anything if the previous step found a cached browser binary
run: npx playwright install --with-deps chromium
working-directory: examples
env:
CI: true
- name: Build component # in the www folder, some CSS files are used from the source/dist folder
run: npm run build
- name: Build test app
run: npm run ci:test:build
- name: Running Playwright Tests
run: npm run ci:test:run
- name: Save browser binaries for Playwright
id: playwright-save
uses: actions/cache/save@v4
with:
path: '~/.cache/ms-playwright'
key: '${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}'
# - name: Linting
# run: npm run lint
# working-directory: source
- name: Update TOC in markdown files
run: npm run doctoc
- name: Bump version
working-directory: source
run: npm run bump:${WILL_RELEASE_VERSION}
- name: Building
run: npm run build
- name: copy .npmrc
run: cp .npmrc source && cp .npmrc source/dist
- name: Ship it
uses: './.github/actions/execute-cmd'
with:
cmd_to_execute: $WILL_RELEASE_CMD
- run: git diff
- run: cat package.json
working-directory: source
- name: Push changes
uses: './.github/actions/git-push-action'
with:
branch: ${{ github.ref_name }}
github_token: ${{ secrets.DEPLOY_GITHUB_TOKEN }}
# - name: Send version to slack
# uses: "./.github/actions/send-version-to-slack"
# with:
# slack_webhook_notify: ${{ secrets.SLACK_WEBHOOK_NOTIFY }}
publish-docs-on-release:
needs: release
name: 'Rebuilds website'
uses: ./.github/workflows/rebuild-website.yml
secrets: inherit