-
Notifications
You must be signed in to change notification settings - Fork 255
65 lines (56 loc) · 2.22 KB
/
release.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
name: Release
on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- 'browsers/chrome/manifest.json'
jobs:
release:
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, 'ci release')"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: |
npm i -g web-ext
npm run install-ci
- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@d552ecf3366cf9d6da9fd7dbe425325d3d095aa8
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Build Firefox
run: |
npm run release-firefox
echo "VERSION=$(jq -r .version ./browsers/firefox/manifest.json)" >> $GITHUB_ENV
- name: Build Chrome
run: |
npm run release-chrome
- name: Package Firefox
run: |
cd build/firefox/release && web-ext build
echo "BUILT_WITH=Built with node $(node --version) and npm $(npm --version)" >> $GITHUB_ENV
- name: Create Release
uses: softprops/action-gh-release@4634c16e79c963813287e889244c50009e7f0981
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
prerelease: false
body: "${{ steps.changelog.outputs.changelog }}\n\n${{ env.BUILT_WITH }}"
tag_name: ${{ env.VERSION }}
target_commitish: ${{ github.ref }}
files: |
./build/firefox/release/web-ext-artifacts/*.zip
./build/chrome/release/*.zip
- name: Asana Workflow
env:
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}
RELEASE_URL: 'https://github.com/duckduckgo/duckduckgo-privacy-extension/releases/tag/${{ env.VERSION }}'
run: node scripts/asana-release.js