-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (40 loc) · 1.33 KB
/
package-extension.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
name: Package and Release Firefox Extension
on:
push:
branches:
- main # Adjust this as per your main branch
workflow_dispatch:
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Set up Git User
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14' # Set your Node.js version
- name: Install Dependencies
run: npm install
- name: Lint with ESLint
run: npx eslint .
- name: Get Version
id: get_version
run: echo "VERSION=$(jq -r .version src/manifest.json)" >> $GITHUB_ENV
- name: Package Extension
run: |
cd src
zip -r -Z deflate ../ImageConverter-${{ env.VERSION }}.zip manifest.json background.js content-script.js _locales/ icons/icon-48.png icons/icon-96.png
- name: Create and Upload Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: "v${{ env.VERSION }}"
prerelease: false
title: "Release v${{ env.VERSION }}"
files: |
ImageConverter-${{ env.VERSION }}.zip