forked from duckduckgo/duckduckgo-privacy-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (70 loc) · 2.66 KB
/
stage.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Stage Release
on:
workflow_dispatch:
inputs:
version:
required: true
description: 'Release version'
jobs:
release_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Install dependencies
run: |
npm i -g web-ext
npm run install-ci
- name: Fetch config and update version
run: |
npm run bundle-config
node scripts/bumpVersion.js ${{ github.event.inputs.version }}
- name: Prepare release branch
run: |
git checkout -B release-${{ github.event.inputs.version }}
git fetch origin release-${{ github.event.inputs.version }} || true
git push --set-upstream origin release-${{ github.event.inputs.version }} -f
- name: Commit config and version updates
uses: stefanzweifel/git-auto-commit-action@0049e3fa4059ca715255fbbcb7dea4516f02ce0a
with:
commit_message: "Prepare release ${{ github.event.inputs.version }}"
tagging_message: ${{ github.event.inputs.version }}
- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@c3f61b2a3db543ceee83c759ac8e48419a1a2211
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 Release
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 draft
uses: softprops/action-gh-release@9729932bfb75c05ad1f6e3a729294e05abaa7001
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
prerelease: true
body: "${{ steps.changelog.outputs.changelog }}\n\n${{ env.BUILT_WITH }}"
tag_name: ${{ github.event.inputs.version }}
files: |
./build/firefox/release/web-ext-artifacts/*.zip
./build/chrome/release/*.zip
- name: Asana Workflow
env:
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}
VERSION: ${{ github.event.inputs.version }}
RELEASE_URL: "https://github.com/duckduckgo/duckduckgo-privacy-extension/releases/tag/${{ github.event.inputs.version }}"
run:
node scripts/asana-release.js