-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 1.44 KB
/
Copy pathrelease.yml
File metadata and controls
48 lines (41 loc) · 1.44 KB
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
name: Build and Release Extension
on:
push:
branches:
- main
paths:
- 'manifest.json'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get version from manifest.json
id: get_version
run: echo "VERSION=$(jq -r '.version' manifest.json)" >> $GITHUB_OUTPUT
- name: Create ZIP package
run: |
mkdir -p package
cp manifest.json background.js content.js package/
cp -r css js libs icons package/
cd package
zip -r ../bivinote-v${{ steps.get_version.outputs.VERSION }}-chrome.zip *
- name: Get Release Notes from CHANGELOG.md
id: extract_notes
run: |
NOTES=$(awk '/## \[${{ steps.get_version.outputs.VERSION }}\]/{flag=1; next} /## \[[0-9]+\.[0-9]+\.[0-9]+\]/{flag=0} flag' CHANGELOG.md)
echo "NOTES<<EOF" >> $GITHUB_OUTPUT
echo "$NOTES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.get_version.outputs.VERSION }}
name: BiViNote v${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false
body: ${{ steps.extract_notes.outputs.NOTES }}
files: bivinote-v${{ steps.get_version.outputs.VERSION }}-chrome.zip