generated from tropy/tropy-plugin-example
-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (38 loc) · 1.14 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
name: release
on:
push:
tags:
- v*.*
env:
PLUGIN_NAME: tropiiify
jobs:
create-release:
name: Create release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: Install dependencies and build
run: |
npm ci
npm run build
- name: Generate version name
id: version
run: echo "::set-output name=version::${{ env.PLUGIN_NAME }}-${{github.ref_name}}"
- name: Create zip file
run: |
mkdir ${{ steps.version.outputs.version }}
cp index.js package.json icon.svg third-party-licenses.txt ${{ steps.version.outputs.version }}
zip -r ${{ steps.version.outputs.version }}.zip ${{ steps.version.outputs.version }}
- name: Create release and upload zip file
uses: ncipollo/release-action@v1
with:
artifacts: ${{ steps.version.outputs.version }}.zip
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}