-
Notifications
You must be signed in to change notification settings - Fork 15
64 lines (55 loc) · 1.63 KB
/
main.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
62
63
64
name: CI
on:
push:
tags:
- "v*"
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci
- name: Publish
uses: lannonbr/vsce-action@master
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
with:
args: "publish -p $VSCE_TOKEN"
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
- name: Package
uses: lannonbr/vsce-action@master
with:
args: "package"
- name: Get package name
id: get_package_name
run: |
echo "::set-output name=name::$(echo vscode-ghc-simple-*.vsix)"
- name: Upload artifact
uses: actions/[email protected]
with:
name: extension-package
path: ${{ steps.get_package_name.outputs.name }}
- name: Create release
id: create_release
uses: actions/create-release@v1
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Version ${{ github.ref }}
- name: Upload release
uses: actions/upload-release-asset@v1
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.get_package_name.outputs.name }}
asset_name: ${{ steps.get_package_name.outputs.name }}
asset_content_type: application/vsix