-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.38 KB
/
release.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
name: Release
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get release info
run: |
{
echo "RELEASE_TAG=${GITHUB_REF/refs\/tags\//}"
echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}"
} >> "$GITHUB_ENV"
- name: Checkout code
uses: actions/checkout@v4
with:
sparse-checkout: |
src
- name: Install zip
run: sudo apt-get install zip
- name: Create zip file without including the parent folder
run: cd src && zip -r ../extension.zip *
- name: Upload release asset for Chrome
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./extension.zip
asset_name: "chrome-${{ env.REPOSITORY_NAME }}_${{ env.RELEASE_TAG }}.zip"
asset_content_type: application/zip
- name: Upload release asset for Brave
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./extension.zip
asset_name: "brave-${{ env.REPOSITORY_NAME }}_${{ env.RELEASE_TAG }}.zip"
asset_content_type: application/zip