Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Commit 7936939

Browse files
committed
chore: add release workflow
1 parent ec7aa55 commit 7936939

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest]
14+
node-version: [14]
15+
steps:
16+
- name: Fetch repository
17+
uses: actions/checkout@v2
18+
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
24+
- name: Cache node modules
25+
uses: actions/cache@v2
26+
with:
27+
path: node_modules
28+
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
29+
restore-keys: |
30+
${{ runner.OS }}-build-${{ env.cache-name }}-
31+
${{ runner.OS }}-build-
32+
${{ runner.OS }}-
33+
34+
- name: yarn install, build, bundle
35+
run: |
36+
yarn install
37+
yarn release
38+
39+
- uses: ncipollo/release-action@v1
40+
with:
41+
artifacts: 'release/*.zip'
42+
token: ${{ secrets.GITHUB_TOKEN }}
43+
draft: true

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ set -e
44

55
mkdir -p ./release
66

7-
zip -r "extension.${npm_package_version}.zip" "./build"
7+
zip -r "extension.zip" "./build"
88
mv extension.* ./release

0 commit comments

Comments
 (0)