Skip to content

Commit 5f2e2ce

Browse files
author
GitHub Actions
committed
Merge branch 'main' into v1
2 parents e387c0f + db15bda commit 5f2e2ce

File tree

6 files changed

+2163
-1753
lines changed

6 files changed

+2163
-1753
lines changed

.github/renovate.json5

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"github>microsoft/m365-renovate-config:scheduleNoisy"
88
],
99

10-
1110
"ignorePresets": [
1211
// Ignore default semantic commit config (see packageRules below)
1312
":semanticPrefixFixDepsChoreOthers",

.github/workflows/release.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,25 @@ concurrency:
1313
env:
1414
MAJOR_BRANCH: v1
1515

16+
permissions:
17+
actions: read
18+
1619
jobs:
1720
release:
18-
runs-on: ubuntu-latest
1921
# Only run this if it's a workflow_dispatch trigger or the CI workflow was successful
2022
if: ${{ github.event.workflow_run == null || github.event.workflow_run.conclusion == 'success' }}
23+
24+
runs-on: ubuntu-latest
25+
26+
# This environment contains secrets needed for publishing
27+
environment: release
28+
2129
steps:
2230
- uses: actions/checkout@v3
2331
with:
2432
fetch-depth: 0
33+
# Don't save creds in the git config (so it's easier to override later)
34+
persist-credentials: false
2535

2636
- name: Set up Node
2737
uses: actions/setup-node@v3
@@ -46,19 +56,30 @@ jobs:
4656
if: ${{ steps.shouldRelease.outputs.shouldRelease == 'yes' }}
4757
run: |
4858
set -x
49-
git config user.name "GitHub Workflow"
59+
60+
# Get the existing remote URL without creds, and use a trap (like try/finally)
61+
# to restore it after this step finishes
62+
trap "git remote set-url origin '$(git remote get-url origin)'" EXIT
63+
64+
# Add a token to the remote URL for auth during release
65+
git remote set-url origin "https://[email protected]/$GITHUB_REPOSITORY"
66+
67+
git config user.name "GitHub Actions"
5068
git config user.email "not provided"
51-
git checkout $MAJOR_BRANCH
69+
70+
git checkout "$MAJOR_BRANCH"
5271
git merge main --no-edit -Xtheirs
5372
git push origin main
73+
env:
74+
REPO_PAT: ${{ secrets.REPO_PAT }}
5475

5576
- name: Release from ${{ env.MAJOR_BRANCH }}
5677
if: ${{ steps.shouldRelease.outputs.shouldRelease == 'yes' }}
5778
run: |
5879
set -x
5980
yarn check-token "$GH_TOKEN"
60-
GITHUB_REF=refs/heads/$MAJOR_BRANCH yarn release
81+
GITHUB_REF="refs/heads/$MAJOR_BRANCH" yarn release
6182
env:
62-
GH_TOKEN: ${{ secrets.TOKEN_RELEASE }}
63-
GIT_AUTHOR_NAME: GitHub Workflow
83+
GH_TOKEN: ${{ secrets.REPO_PAT }}
84+
GIT_AUTHOR_NAME: GitHub Actions
6485
GIT_AUTHOR_EMAIL: not provided

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ Group D3 updates (except when initially pinning).
323323

324324
#### `groupEslint`
325325

326-
Group all eslint-related updates (except when initially pinning).
326+
Group and schedule all eslint-related updates (except when initially pinning).
327327

328328
<details><summary><b>Show config JSON</b></summary>
329329

@@ -333,7 +333,8 @@ Group all eslint-related updates (except when initially pinning).
333333
{
334334
"groupName": "eslint packages",
335335
"matchPackagePatterns": ["eslint"],
336-
"matchUpdateTypes": ["major", "minor", "patch", "bump", "digest"]
336+
"matchUpdateTypes": ["major", "minor", "patch", "bump", "digest"],
337+
"schedule": ["before 8am on Monday"]
337338
}
338339
]
339340
}

groupEslint.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33

4-
"description": "Group all eslint-related updates (except when initially pinning).",
4+
"description": "Group and schedule all eslint-related updates (except when initially pinning).",
55

66
"packageRules": [
77
{
88
"groupName": "eslint packages",
99
"matchPackagePatterns": ["eslint"],
10-
"matchUpdateTypes": ["major", "minor", "patch", "bump", "digest"]
10+
"matchUpdateTypes": ["major", "minor", "patch", "bump", "digest"],
11+
"schedule": ["before 8am on Monday"]
1112
}
1213
]
1314
}

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@
1414
"format": "prettier --write .",
1515
"lint": "node ./scripts/lintPresets.js",
1616
"prepare": "husky install",
17-
"release": "semantic-release",
17+
"release": "HUSKY=0 semantic-release",
1818
"test:basic": "node ./scripts/testPresetsBasic.js",
1919
"test:full": "node ./scripts/testPresetsFull.js",
2020
"update-readme": "node ./scripts/updateReadme.js",
2121
"update-refs": "node ./scripts/updateRefs.js"
2222
},
2323
"devDependencies": {
24-
"@commitlint/cli": "17.1.2",
25-
"@semantic-release/changelog": "6.0.1",
24+
"@commitlint/cli": "17.4.4",
25+
"@semantic-release/changelog": "6.0.2",
2626
"@semantic-release/exec": "6.0.3",
2727
"@semantic-release/git": "10.0.1",
2828
"@types/jju": "1.4.2",
29-
"@types/node": "16.11.59",
29+
"@types/node": "16.18.12",
3030
"conventional-changelog-conventionalcommits": "5.0.0",
31-
"execa": "6.1.0",
32-
"husky": "8.0.1",
31+
"execa": "7.0.0",
32+
"husky": "8.0.3",
3333
"jju": "1.4.0",
34-
"prettier": "2.7.1",
35-
"renovate": "32.201.1",
34+
"prettier": "2.8.4",
35+
"renovate": "34.148.0",
3636
"semantic-release": "19.0.5",
37-
"typescript": "4.8.3"
37+
"typescript": "4.9.5"
3838
},
3939
"release": {
4040
"branches": [

0 commit comments

Comments
 (0)