Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2646a8b

Browse files
committed
Release: migrate release process to release-it
*Authors*- Checking and updating authors has been migrated to a custom script in the repo*Changelog*- changelogplease is no longer maintained- generate changelog in markdown for GitHub releases- generate changelog in HTML for blog posts- generate contributors list in HTML for blog posts*dist*- clone dist repo, copy files, and commit/push- commit tag with dist files on main branch; remove dist files from main branch after release*cdn*- clone cdn repo, copy files, and commit/push- create versioned and unversioned copies in cdn/- generate md5 sums and archives for Google and MSFT*build*- implement reproducible builds and verify release builds * uses the last modified date for the latest commit * Seehttps://reproducible-builds.org/- the verify workflow also ensures all files were properly published to the CDN and npm*docs*- the new release workflow is documented at build/release/README.md*misc*- now that we don't need the jquery-release script and now that we no longer need to build on Node 10, we can use ESM in all files in the build folder- move dist wrappers to "wrappers" folders for easy removal of all built files- limit certain workflows to the main repo (not forks)- version in package.json has been set to beta.1 so that the next release will be beta.2- release-it added the `preReleaseBase` option and we now always set it to `1` in the npm script. This is a noop for stable releases.Fixes jquery/jquery-release#114Closesgh-5512
1 parent3a98ef9 commit2646a8b

38 files changed

+5319
-1226
lines changed

‎.editorconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ insert_final_newline = true
1313
[*.{json,yml}]
1414
indent_style =space
1515
indent_size =2
16-

‎.github/workflows/filestash.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ permissions:
1010

1111
jobs:
1212
update:
13+
name:Update Filestash
1314
runs-on:ubuntu-latest
15+
# skip on forks
16+
if:${{ github.repository == 'jquery/jquery' }}
1417
environment:filestash
1518
env:
1619
NODE_VERSION:20.x
17-
name:Update Filestash
1820
steps:
1921
-name:Checkout
2022
uses:actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332# v4.1.7

‎.github/workflows/verify-release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name:Reproducible Builds
2+
on:
3+
# On tags
4+
push:
5+
tags:
6+
-'*'
7+
# Or manually
8+
workflow_dispatch:
9+
inputs:
10+
version:
11+
description:'Version to verify (>= 4.0.0-beta.2)'
12+
required:false
13+
14+
jobs:
15+
run:
16+
name:Verify release
17+
runs-on:ubuntu-latest
18+
# skip on forks
19+
if:${{ github.repository == 'jquery/jquery' }}
20+
env:
21+
NODE_VERSION:20.x
22+
steps:
23+
-name:Checkout
24+
uses:actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29# v4.1.6
25+
26+
-name:Use Node.js ${{ env.NODE_VERSION }}
27+
uses:actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8# v4.0.2
28+
with:
29+
node-version:${{ env.NODE_VERSION }}
30+
31+
-run:npm run release:verify
32+
env:
33+
VERSION:${{ github.event.inputs.version || github.ref_name }}

‎.gitignore

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*~
44
*.diff
55
*.patch
6-
/*.html
76
.DS_Store
87
.bower.json
98
.sizecache.json
@@ -13,26 +12,28 @@ tmp
1312

1413
npm-debug.log*
1514

16-
# Ignoreeverythingin `dist` folder except for
17-
# theESLint config &package.jsonfiles
15+
# Ignorebuilt filesin `dist` folder
16+
#Leavethe package.jsonand wrappers
1817
/dist/*
1918
!/dist/package.json
20-
!/dist/jquery.bundler-require-wrapper.js
21-
!/dist/jquery.bundler-require-wrapper.slim.js
19+
!/dist/wrappers
2220

23-
# Ignoreeverythinginthe`dist-module` folder except for the ESLint config,
24-
# package.json& Node module wrapper files
21+
# Ignorebuilt filesin `dist-module` folder
22+
#Leave thepackage.jsonand wrappers
2523
/dist-module/*
2624
!/dist-module/package.json
27-
!/dist-module/jquery.node-module-wrapper.js
28-
!/dist-module/jquery.node-module-wrapper.slim.js
25+
!/dist-module/wrappers
2926

3027
/external
3128
/node_modules
3229

3330
/test/data/core/jquery-iterability-transpiled.js
3431
/test/data/qunit-fixture.js
3532

36-
# Ignore BrowserStack files
33+
# Release artifacts
34+
changelog.*
35+
contributors.*
36+
37+
# Ignore BrowserStack testing files
3738
local.log
3839
browserstack.err

‎.npmignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
.eslintignore
2+
.eslintcache
23
eslint.config.js
34

45
/.editorconfig
56
/.gitattributes
67
/.mailmap
8+
/.sizecache.json
79

810
/build
911
/external
10-
/speed
1112
/test
12-
/Gruntfile.cjs
13+
/tmp
14+
/changelog.html
15+
/contributors.html

‎.release-it.cjs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"use strict";
2+
3+
constblogURL=process.env.BLOG_URL;
4+
5+
if(!blogURL||!blogURL.startsWith("https://blog.jquery.com/")){
6+
thrownewError("A valid BLOG_URL must be set in the environment");
7+
}
8+
9+
module.exports={
10+
hooks:{
11+
"before:init":"./build/release/pre-release.sh",
12+
"before:git:release":"git add -f dist/ dist-module/ changelog.md",
13+
"after:version:bump":
14+
"sed -i 's/main/AUTHORS.txt/${version}/AUTHORS.txt/' package.json",
15+
"after:release":`./build/release/post-release.sh \${version}${blogURL}`
16+
},
17+
git:{
18+
changelog:"npm run release:changelog -- ${from} ${to}",
19+
commitMessage:"Release: ${version}",
20+
getLatestTagFromAllRefs:true,
21+
requireBranch:"main",
22+
requireCleanWorkingDir:true
23+
},
24+
github:{
25+
release:true,
26+
tokenRef:"JQUERY_GITHUB_TOKEN"
27+
},
28+
npm:{
29+
publish:true
30+
}
31+
};

‎build/command.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
"use strict";
2-
3-
const{ build}=require("./tasks/build");
4-
constyargs=require("yargs/yargs");
5-
constslimExclude=require("./tasks/lib/slim-exclude");
1+
importyargsfrom"yargs/yargs";
2+
import{build}from"./tasks/build.js";
3+
importslimExcludefrom"./tasks/lib/slim-exclude.js";
64

75
constargv=yargs(process.argv.slice(2))
86
.version(false)

‎build/package.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎build/release.js

Lines changed: 0 additions & 96 deletions
This file was deleted.

‎build/release/README.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
#Releasing jQuery
2+
3+
This document describes the process for releasing a new version of jQuery. It is intended for jQuery team members and collaborators who have been granted permission to release new versions.
4+
5+
##Prerequisites
6+
7+
Before you can release a new version of jQuery, you need to have the following tools installed:
8+
9+
-[Node.js](https://nodejs.org/) (latest LTS version)
10+
-[npm](https://www.npmjs.com/) (comes with Node.js)
11+
-[git](https://git-scm.com/)
12+
13+
##Setup
14+
15+
1. Clone the jQuery repo:
16+
17+
```sh
18+
git clone git@github.com:jquery/jquery.git
19+
cd jquery
20+
```
21+
22+
1. Install the dependencies:
23+
24+
```sh
25+
npm install
26+
```
27+
28+
1. Log into npm with a user that has access to the`jquery` package.
29+
30+
```sh
31+
npm login
32+
```
33+
34+
The release script will not run if not logged in.
35+
36+
1. Set`JQUERY_GITHUB_TOKEN` in the shell environment that will be used to run`npm run release`. The token can be[created on GitHub](https://github.com/settings/tokens/new?scopes=repo&description=release-it) and only needs the`repo` scope. This token is used to publish GitHub release notes and generate a list of contributors for the blog post.
37+
38+
```sh
39+
export JQUERY_GITHUB_TOKEN=...
40+
```
41+
42+
The release script will not run without this token.
43+
44+
##Release Process
45+
46+
1. Ensure all milestoned issues/PRs are closed, or reassign to a new milestone.
47+
1. Verify all tests are passing in[CI](https://github.com/jquery/jquery/actions).
48+
1. Run any release-only tests, such as those in the[`test/integration`](../../test/integration/) folder.
49+
1. Ensure AUTHORS.txt file is up to date (this will be verified by the release script).
50+
51+
- Use `npm run authors:update` to update.
52+
53+
1. Create draft blog post on blog.jquery.com; save the link before publishing. The link is required to run the release.
54+
55+
- Highlight major changes and reason for release.
56+
- Add contributor list generated in the below release script.
57+
- Add HTML from the `changelog.html` generated in the below release script.
58+
- Use HTML from the `contributors.html` generated in the below release script in the "Thanks" section.
59+
60+
1. Run a dry run of the release script:
61+
62+
```sh
63+
BLOG_URL=https://blog.jquery.com/... npm run release -- -d
64+
```
65+
66+
1. If the dry run is successful, run the release script:
67+
68+
```sh
69+
BLOG_URL=https://blog.jquery.com/... npm run release
70+
```
71+
72+
This will run the pre-release script, which includes checking authors, running tests, running the build, and cloning the CDN and jquery-dist repos in the `tmp/` folder.
73+
74+
It will then walk you through the rest of the release process: creating the tag, publishing to npm, publishing release notes on GitHub, and pushing the updated branch and new tag to the jQuery repo.
75+
76+
Finally, it will run the post-release script, which will ask you to confirm the files prepared in `tmp/release/cdn` and `tmp/release/dist` are correct before pushing to the respective repos. It will also prepare a commit for the jQuery repo to remove the release files and update the AUTHORS.txt URL in the package.json. It will ask for confirmation before pushing that commit as well.
77+
78+
For a pre-release, run:
79+
80+
```sh
81+
BLOG_URL=https://blog.jquery.com/... npm run release -- --preRelease=beta
82+
```
83+
84+
`preRelease` can also be set to `alpha` or `rc`.
85+
86+
**Note**: `preReleaseBase` is set in the npm script to `1` to ensure any pre-releases start at `.1` instead of `.0`. This does not interfere with stable releases.
87+
88+
1. Once the release is complete, publish the blog post.
89+
90+
##Stable releases
91+
92+
Stable releases have a few more steps:
93+
94+
1. Close the milestone matching the current release:https://github.com/jquery/jquery/milestones. Ensure there is a new milestone for the next release.
95+
1. Update jQuery onhttps://github.com/jquery/jquery-wp-content.
96+
1. Update jQuery onhttps://github.com/jquery/blog.jquery.com-theme.
97+
1. Update latest jQuery version for[healthyweb.org](https://github.com/jquery/healthyweb.org/blob/main/wrangler.toml).
98+
1. Update the shipping version on[jquery.com home page](https://github.com/jquery/jquery.com).
99+
100+
```sh
101+
git pull jquery/jquery.com
102+
# Edit index.html and download.md
103+
git commit
104+
npm version patch
105+
git push origin main --tags
106+
```
107+
108+
1. Update the version used in[jQuery docs demos](https://github.com/jquery/api.jquery.com/blob/main/entries2html.xsl).
109+
110+
1. Email archives to CDNs.
111+
112+
| CDN| Emails| Include|
113+
| ---| ------| -------|
114+
| Google| hosted-libraries@google|`tmp/archives/googlecdn-jquery-*.zip`|
115+
| Microsoft| damian.edwards@microsoft, Chris.Sfanos@microsoft|`tmp/archives/mscdn-jquery-*.zip`|
116+
| CDNJS| ryan@ryankirkman, thomasalwyndavis@gmail| Blog post link|

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp