-
-
Notifications
You must be signed in to change notification settings - Fork 14
55 lines (55 loc) · 1.84 KB
/
cd.yaml
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
name: CD
on:
push:
tags:
- 'v*'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- run: npm ci
- run: npm run lint
- run: npm run build
- uses: yashanand1910/[email protected]
id: get_release_notes
with:
changelog_path: ./CHANGELOG.md
version: ${{ steps.previoustag.outputs.tag }}
- name: Create Github Release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ steps.previoustag.outputs.tag }}
tag_name: ${{ steps.previoustag.outputs.tag }}
body: ${{ steps.get_release_notes.outputs.release_notes }}
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Upload Chrome Extension
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./web-ext-artifacts/chrome.zip
asset_name: chrome-${{ steps.previoustag.outputs.tag }}.zip
asset_content_type: application/zip
- name: Upload Firefox Extension
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./web-ext-artifacts/firefox.zip
asset_name: firefox-${{ steps.previoustag.outputs.tag }}.zip
asset_content_type: application/zip