|
19 | 19 | runs-on: ubuntu-latest
|
20 | 20 | steps:
|
21 | 21 | - uses: actions/checkout@v2
|
22 |
| - with: |
23 |
| - # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits |
24 |
| - fetch-depth: 0 |
25 | 22 |
|
26 | 23 | - name: Setup Node.js 16.x
|
27 | 24 | uses: actions/setup-node@v2
|
|
36 | 33 | env:
|
37 | 34 | NODE_OPTIONS: "--max-old-space-size=4096" # Increase heap size for jest
|
38 | 35 |
|
39 |
| - - name: Create Release Pull Request |
| 36 | + - name: Create Release Pull Request or Publish Packages |
| 37 | + id: changesets |
40 | 38 | uses: changesets/action@master
|
41 | 39 | with:
|
42 | 40 | publish: npm run release
|
|
60 | 58 | for (const { name: tag, version } of publishedPackages) {
|
61 | 59 | // Only upload the dist archive for the chore package, plugins, and extensions
|
62 | 60 | if (tag.startsWith("jspsych@") || tag.includes("/plugin-") || tag.includes("/extension-")) {
|
| 61 | + console.log(`Uploading dist archive release asset for ${tag}`); |
63 | 62 | try {
|
64 | 63 | // https://docs.github.com/en/rest/reference/repos#get-a-release-by-tag-name
|
65 | 64 | const releaseId = (
|
|
79 | 78 | // Tag to filename transformation:
|
80 | 79 | // * [email protected] => jspsych-1.2.3-dist.zip
|
81 | 80 | // * @jspsych/[email protected] => jspsych-plugin-test-1.2.3-dist.zip
|
82 |
| - // * @jspsych-contrib/[email protected] => jspsych-contrib-plugin-test-1.2.3-dist.zip |
83 |
| - name: `${tag |
84 |
| - .replace("@jspsych/", "jspsych-") |
85 |
| - .replace("@jspsych-contrib/", "jspsych-contrib-") |
86 |
| - .replace("@", "-")}-dist.zip`, |
| 81 | + name: `${tag.replace("@jspsych/", "jspsych-").replace("@", "-")}-dist.zip`, |
87 | 82 |
|
88 | 83 | label: "Dist archive (zip)",
|
89 | 84 | headers: {
|
|
101 | 96 |
|
102 | 97 | if (errorMessage) {
|
103 | 98 | core.setFailed(errorMessage);
|
| 99 | + } else { |
| 100 | + console.log(`Release assets successfully uploaded`); |
104 | 101 | }
|
0 commit comments