@duckduckgo/autoconsent 10.5.0 → 10.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,62 @@
1
1
  name: Propagate Autoconsent To DDG Apps
2
2
 
3
3
  on:
4
- release:
5
- types: [ published ]
4
+ workflow_dispatch:
5
+ inputs:
6
+ tag_name:
7
+ description: 'The tag of the release to propagate'
8
+ required: true
6
9
 
7
10
  env:
8
- VERSION: ${{ github.event.release.tag_name }}
9
- RELEASE_URL: ${{ github.event.release.html_url }}
10
- RELEASE_NOTES: ${{ github.event.release.body }}
11
- PR_TITLE: Update autoconsent to ${{ github.event.release.tag_name }}
11
+ TAG: ${{ inputs.tag_name }}
12
12
 
13
13
  jobs:
14
+ # ------------------------------------------------------------------------------
15
+ # Retrieve the corresponding Release data from the GitHub API
16
+ # ------------------------------------------------------------------------------
17
+ get_release_info:
18
+ runs-on: ubuntu-latest
19
+ outputs:
20
+ release-url: ${{ steps.get-release-url.outputs.result }}
21
+ release-notes: ${{ steps.get-release-notes.outputs.result }}
22
+ steps:
23
+ - name: Get Release URL
24
+ id: get-release-url
25
+ uses: actions/github-script@v4
26
+ with:
27
+ result-encoding: string
28
+ script: |
29
+ const { data } = await github.repos.getReleaseByTag({
30
+ owner: context.repo.owner,
31
+ repo: context.repo.repo,
32
+ tag: process.env.TAG
33
+ });
34
+ return data.html_url;
35
+
36
+ - name: Get Release Notes
37
+ id: get-release-notes
38
+ uses: actions/github-script@v4
39
+ with:
40
+ result-encoding: string
41
+ script: |
42
+ const { data } = await github.repos.getReleaseByTag({
43
+ owner: context.repo.owner,
44
+ repo: context.repo.repo,
45
+ tag: process.env.TAG
46
+ });
47
+ return data.body;
14
48
 
15
49
  # ------------------------------------------------------------------------------
16
50
  # Create initial Asana subtasks
17
51
  # ------------------------------------------------------------------------------
18
52
  create_asana_tasks:
53
+ needs: get_release_info
19
54
  runs-on: ubuntu-latest
20
55
  outputs:
21
56
  asana-output: ${{ steps.create-asana-tasks.outputs.ASANA_OUTPUT }}
57
+ env:
58
+ RELEASE_URL: ${{ needs.get_release_info.outputs.release-url }}
59
+ RELEASE_NOTES: ${{ needs.get_release_info.outputs.release-notes }}
22
60
  steps:
23
61
  # --- Setup ---
24
62
  - uses: actions/checkout@v3
@@ -42,7 +80,12 @@ jobs:
42
80
  runs-on: ubuntu-latest
43
81
  outputs:
44
82
  pull-request-url: ${{ steps.create-pr.outputs.pull-request-url }}
45
- needs: create_asana_tasks
83
+ needs:
84
+ - create_asana_tasks
85
+ - get_release_info
86
+ env:
87
+ RELEASE_URL: ${{ needs.get_release_info.outputs.release-url }}
88
+ RELEASE_NOTES: ${{ needs.get_release_info.outputs.release-notes }}
46
89
  steps:
47
90
  # --- Setup ---
48
91
  - uses: actions/checkout@v3
@@ -62,7 +105,7 @@ jobs:
62
105
  - name: Update Android autoconsent reference
63
106
  run: |
64
107
  cd android
65
- npm install @duckduckgo/autoconsent@${{ env.VERSION }}
108
+ npm install @duckduckgo/autoconsent@${{ env.TAG }}
66
109
  npm run rebuild-autoconsent
67
110
  cd ..
68
111
  - name: Create Android PR Body
@@ -85,9 +128,9 @@ jobs:
85
128
  package.json
86
129
  package-lock.json
87
130
  autoconsent/
88
- commit-message: Update autoconsent to ${{ env.VERSION }}
89
- branch: update-autoconsent-${{ env.VERSION }}
90
- title: ${{ env.PR_TITLE }}
131
+ commit-message: Update autoconsent to ${{ env.TAG }}
132
+ branch: update-autoconsent-${{ env.TAG }}
133
+ title: Update autoconsent to ${{ env.TAG }}
91
134
  body: "${{ env.PR_BODY_ANDROID }}"
92
135
  token: ${{ secrets.DAX_WEB_AUTOFILL_AUTOMATION }}
93
136
 
@@ -100,7 +143,12 @@ jobs:
100
143
  runs-on: ubuntu-latest
101
144
  outputs:
102
145
  pull-request-url: ${{ steps.create-pr.outputs.pull-request-url }}
103
- needs: create_asana_tasks
146
+ needs:
147
+ - create_asana_tasks
148
+ - get_release_info
149
+ env:
150
+ RELEASE_URL: ${{ needs.get_release_info.outputs.release-url }}
151
+ RELEASE_NOTES: ${{ needs.get_release_info.outputs.release-notes }}
104
152
  steps:
105
153
  # --- Setup ---
106
154
  - uses: actions/checkout@v3
@@ -120,7 +168,7 @@ jobs:
120
168
  - name: Update iOS autoconsent reference
121
169
  run: |
122
170
  cd ios
123
- npm install @duckduckgo/autoconsent@${{ env.VERSION }}
171
+ npm install @duckduckgo/autoconsent@${{ env.TAG }}
124
172
  npm run rebuild-autoconsent
125
173
  cd ..
126
174
  - name: Create iOS PR Body
@@ -143,9 +191,9 @@ jobs:
143
191
  package.json
144
192
  package-lock.json
145
193
  DuckDuckGo/Autoconsent/
146
- commit-message: Update autoconsent to ${{ env.VERSION }}
147
- branch: update-autoconsent-${{ env.VERSION }}
148
- title: ${{ env.PR_TITLE }}
194
+ commit-message: Update autoconsent to ${{ env.TAG }}
195
+ branch: update-autoconsent-${{ env.TAG }}
196
+ title: Update autoconsent to ${{ env.TAG }}
149
197
  body: "${{ env.PR_BODY_IOS }}"
150
198
  token: ${{ secrets.DAX_WEB_AUTOFILL_AUTOMATION }}
151
199
 
@@ -157,7 +205,12 @@ jobs:
157
205
  runs-on: ubuntu-latest
158
206
  outputs:
159
207
  pull-request-url: ${{ steps.create-pr.outputs.pull-request-url }}
160
- needs: create_asana_tasks
208
+ needs:
209
+ - create_asana_tasks
210
+ - get_release_info
211
+ env:
212
+ RELEASE_URL: ${{ needs.get_release_info.outputs.release-url }}
213
+ RELEASE_NOTES: ${{ needs.get_release_info.outputs.release-notes }}
161
214
  steps:
162
215
  # --- Setup ---
163
216
  - uses: actions/checkout@v3
@@ -177,7 +230,7 @@ jobs:
177
230
  - name: Update macOS autoconsent reference
178
231
  run: |
179
232
  cd macos
180
- npm install @duckduckgo/autoconsent@${{ env.VERSION }}
233
+ npm install @duckduckgo/autoconsent@${{ env.TAG }}
181
234
  npm run rebuild-autoconsent
182
235
  cd ..
183
236
  - name: Create macOS PR Body
@@ -200,9 +253,9 @@ jobs:
200
253
  package.json
201
254
  package-lock.json
202
255
  DuckDuckGo/Autoconsent/
203
- commit-message: Update autoconsent to ${{ env.VERSION }}
204
- branch: update-autoconsent-${{ env.VERSION }}
205
- title: ${{ env.PR_TITLE }}
256
+ commit-message: Update autoconsent to ${{ env.TAG }}
257
+ branch: update-autoconsent-${{ env.TAG }}
258
+ title: Update autoconsent to ${{ env.TAG }}
206
259
  body: "${{ env.PR_BODY_MACOS }}"
207
260
  token: ${{ secrets.DAX_WEB_AUTOFILL_AUTOMATION }}
208
261
 
@@ -214,7 +267,12 @@ jobs:
214
267
  runs-on: ubuntu-latest
215
268
  outputs:
216
269
  pull-request-url: ${{ steps.create-pr.outputs.pull-request-url }}
217
- needs: create_asana_tasks
270
+ needs:
271
+ - create_asana_tasks
272
+ - get_release_info
273
+ env:
274
+ RELEASE_URL: ${{ needs.get_release_info.outputs.release-url }}
275
+ RELEASE_NOTES: ${{ needs.get_release_info.outputs.release-notes }}
218
276
  steps:
219
277
  # --- Setup ---
220
278
  - uses: actions/checkout@v3
@@ -234,7 +292,7 @@ jobs:
234
292
  - name: Update Windows autoconsent reference
235
293
  run: |
236
294
  cd windows/WindowsBrowser/Application/Autoconsent/External
237
- npm install @duckduckgo/autoconsent@${{ env.VERSION }}
295
+ npm install @duckduckgo/autoconsent@${{ env.TAG }}
238
296
  npm run rebuild-autoconsent
239
297
  cd ../../../../../
240
298
  - name: Create Windows PR Body
@@ -255,9 +313,9 @@ jobs:
255
313
  path: windows/
256
314
  add-paths: |
257
315
  WindowsBrowser/Application/Autoconsent/
258
- commit-message: Update autoconsent to ${{ env.VERSION }}
259
- branch: update-autoconsent-${{ env.VERSION }}
260
- title: ${{ env.PR_TITLE }}
316
+ commit-message: Update autoconsent to ${{ env.TAG }}
317
+ branch: update-autoconsent-${{ env.TAG }}
318
+ title: Update autoconsent to ${{ env.TAG }}
261
319
  body: "${{ env.PR_BODY_WINDOWS }}"
262
320
  token: ${{ secrets.DAX_WEB_AUTOFILL_AUTOMATION }}
263
321
 
package/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ # v10.6.0 (Fri Apr 12 2024)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - Fix detection in tarteaucitron [#415](https://github.com/duckduckgo/autoconsent/pull/415) ([@muodov](https://github.com/muodov))
6
+
7
+ #### 🐛 Bug Fix
8
+
9
+ - Monthly Coverage data update [#413](https://github.com/duckduckgo/autoconsent/pull/413) (dax@duckduckgo.com [@sammacbeth](https://github.com/sammacbeth))
10
+
11
+ #### ⚠️ Pushed to `main`
12
+
13
+ - Remove git commit from asana tasks ([@muodov](https://github.com/muodov))
14
+ - Remove the default value for the release workflow ([@muodov](https://github.com/muodov))
15
+ - Make the ddg release workflow manual ([@muodov](https://github.com/muodov))
16
+
17
+ #### Authors: 3
18
+
19
+ - Dax the Deployer (dax@duckduckgo.com)
20
+ - Maxim Tsoy ([@muodov](https://github.com/muodov))
21
+ - Sam Macbeth ([@sammacbeth](https://github.com/sammacbeth))
22
+
23
+ ---
24
+
1
25
  # v10.5.0 (Tue Apr 02 2024)
2
26
 
3
27
  #### 🚀 Enhancement
@@ -7,8 +7,7 @@ const {getLink} = require('./release-utils.js')
7
7
  const md = new MarkdownIt()
8
8
 
9
9
  const ASANA_ACCESS_TOKEN = process.env.ASANA_ACCESS_TOKEN
10
- const commit = process.env.GITHUB_SHA
11
- const version = process.env.VERSION
10
+ const version = process.env.TAG
12
11
  const releaseUrl = process.env.RELEASE_URL || 'https://example.com/'
13
12
  const releaseNotesRaw = process.env.RELEASE_NOTES || '<EMPTY RELEASE NOTES>'
14
13
  const releaseNotes = md.render(releaseNotesRaw)
@@ -101,7 +100,6 @@ const asanaCreateTasks = async () => {
101
100
 
102
101
  const updatedNotes =
103
102
  notes.replace('[[version]]', version)
104
- .replace('[[commit]]', commit)
105
103
  .replace('[[release_url]]', getLink(releaseUrl, 'Autoconsent Release'))
106
104
  .replace('[[notes]]', releaseNotes)
107
105
  .replace(/<\/?p>/ig, '\n')
@@ -18,7 +18,7 @@ const platform = /** @type {ReleasePlatform} */ (process.argv[2])
18
18
 
19
19
  /** @type {CreatePRTemplateData} */
20
20
  const data = {
21
- version: process.env.VERSION || '',
21
+ version: process.env.TAG || '',
22
22
  releaseUrl: process.env.RELEASE_URL || '',
23
23
  releaseNotesRaw: process.env.RELEASE_NOTES || '',
24
24
  asanaOutputRaw: process.env.ASANA_OUTPUT || '{}'