-
Notifications
You must be signed in to change notification settings - Fork 12
59 lines (56 loc) · 1.68 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
name: Release Extension
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
name: 📦 Build Extension
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, ubuntu-18.04, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: npm install
- name: Create extension zip (Mac)
if: runner.os == 'macOS'
shell: bash
run: |
zip -r ${{github.event.repository.name}}-macos.zip .
- name: Create extension zip (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
zip -r ${{github.event.repository.name}}-linux.zip .
- name: Create extension zip (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
Compress-Archive -Path ${Env:GITHUB_WORKSPACE} -DestinationPath ${{github.event.repository.name}}-windows.zip
- uses: actions/upload-artifact@v2
with:
path: ${{github.event.repository.name}}-*.zip
release:
name: 🚀 Create Release
runs-on: ubuntu-18.04
needs: build
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get Artifacts
uses: actions/download-artifact@v2
with:
path: dist/
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/artifact/${{github.event.repository.name}}-linux.zip
dist/artifact/${{github.event.repository.name}}-macos.zip
dist/artifact/${{github.event.repository.name}}-windows.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}