forked from carbon-design-system/ibm-products
-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (90 loc) · 5.72 KB
/
update.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
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
name: Update v2 packages/dependencies # Updates dependencies twice a month
on:
workflow_dispatch:
schedule:
- cron: '0 4 1,15 * *' # Updates will happen every 1st/15th of the month
jobs:
carbon:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install
run: yarn
- name: Update Carbon packages
run: |
yarn upgrade:carbon
yarn
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
- name: Create PR
id: create-pr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.CREATE_PR_ACCESS_TOKEN }}
commit-message: 'fix: update Carbon 11 compatible versions to latest'
committer: GitHub <[email protected]>
author:
${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
branch: 'update-packages'
branch-suffix: random
title: 'fix: update to Carbon 11 compatible versions to latest'
body: |
This PR was automatically generated to update Carbon 11 compatible versions on a regular basis. This is not intended to create any breaking changes, and will be reflected as a minor version bump for affected packages. NB we'll run all tests and do visual verifications, but there is always the opportunity for unexpected regressions. If you're using one of the packages in a stable or production context you may want to check this before taking the next minor version, and do let us know ASAP if you see anything problematic.
The goal is to update to the latest Carbon 11 compatible versions each Friday, to ensure we remain up-to-date with the latest changes (often published on Thursdays) and to ensure interoperability with other packages that also depend on Carbon. We will normally update all other dependencies at the same time to their latest versions, except for specific cases where we have found the updates to be problematic or require further work before they can be used. By using the latest stable version of each dependency we ensure we get fixes and improvements in a timely fashion and reduce the impact of updating the versions that can arise if versions are allowed to become stale for an extended period.
#### What did you change?
This action ran `yarn upgrade:carbon` to upgrade all carbon-related packages to the latest versions.
This PR includes the various `package.json` that pull our dependencies forward to the latest versions, and updates the offline mirror.
#### How did you test and verify your work?
This PR should not be merged until the following checks have been made:
- [ ] A reminder message has been posted onto the ibmproducts-pal-dev Slack channel that a version update PR is going through.
- [ ] `yarn ci-check` runs cleanly and all tests pass (done automatically as part of the PR checks).
- [ ] the Netlify deploy-preview has been used to ensure that storybook runs and the main published components render correctly.
- name: Post reminder to Slack
id: post-reminder
uses: archive/[email protected]
with:
slack-bot-user-oauth-access-token:
${{ secrets.CREATE_PR_SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
slack-channel: G01PUCL3V8R # cspell:disable-line
slack-text: >
Hello! This is a test post. PR number:
${{steps.create-pr.outputs.pull-request-number}} 🤓
- name: Result from "Post reminder to Slack"
run: |
echo "The PR number was ${{ steps.create-pr.outputs.pull-request-number }}"
echo "The result was ${{ steps.post-reminder.outputs.slack-result }}"
dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install
run: yarn
- name: Update packages
run: |
yarn set version latest
yarn upgrade:automatic
rm yarn.lock
yarn
yarn update-gallery-config
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
- name: Create PR
id: create-pr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.CREATE_PR_ACCESS_TOKEN }}
commit-message: 'chore: update dev dependencies'
committer: GitHub <[email protected]>
author:
${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
branch: 'update-packages'
branch-suffix: random
title: 'chore: update dev dependencies'
body: |
This PR was automatically generated to update versions of dev dependencies to their latest versions. This helps ensure we get fixes and improvements in a timely fashion and reduces the impact of updating the versions that can arise if versions are allowed to become stale for an extended period.
#### What did you change?
This action ran `yarn upgrade:automatic` to update `package.json` files to request the latest versions of each package. Certain critical packages are intentionally excluded.
This action also deleted the `yarn.lock` file in order to recreate it with the latest matching versions of secondary dependencies.
This PR includes the various `package.json` that pull our dependencies forward to the latest versions, the `yarn.lock` update that maps required versions to the actual versions to be used, and updates the offline mirror.
#### How did you test and verify your work?
This PR should not normally significantly affect the build outputs or runtime packages. Ensure that `yarn ci-check` runs cleanly and all tests pass (done automatically as part of the PR checks).