-
Notifications
You must be signed in to change notification settings - Fork 100
61 lines (54 loc) · 2.21 KB
/
release.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
name: Release
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Get version
id: get_version
uses: battila7/get-version-action@v2
- run: yarn install
- run: yarn build
- name: Change version
run: |
sed -i -e "s/\"version\": \".*\"/\"version\": \"${{ steps.get_version.outputs.version-without-v }}\"/" manifest.json
sed -i -e "s/\"version\": \".*\"/\"version\": \"${{ steps.get_version.outputs.version-without-v }}\"/" manifest.firefox.json
- name: Package chrome plugin
run: |
mkdir -p release/writely
mv dist release/writely
mv manifest.json release/writely
cd release/writely
zip -r ../writely-chrome-${{ steps.get_version.outputs.version-without-v }}.zip *
- name: Upload plugin to release
uses: svenstaro/upload-release-action@v2
with:
release_name: ${{ steps.get_version.outputs.version }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/writely-chrome-${{ steps.get_version.outputs.version-without-v }}.zip
asset_name: writely-chrome-${{ steps.get_version.outputs.version-without-v }}.zip
tag: ${{ github.ref }}
overwrite: true
body: ${{ steps.tag.outputs.message }}
- name: Package firefox plugin
run: |
rm -rf release/writely/manifest.json
mv manifest.firefox.json release/writely/manifest.json
cd release/writely
zip -r ../writely-firefox-${{ steps.get_version.outputs.version-without-v }}.zip *
- name: Upload plugin to release
uses: svenstaro/upload-release-action@v2
with:
release_name: ${{ steps.get_version.outputs.version }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/writely-firefox-${{ steps.get_version.outputs.version-without-v }}.zip
asset_name: writely-firefox-${{ steps.get_version.outputs.version-without-v }}.zip
tag: ${{ github.ref }}
overwrite: true
body: ${{ steps.tag.outputs.message }}