-
Notifications
You must be signed in to change notification settings - Fork 11
49 lines (43 loc) · 1.32 KB
/
pre-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
name: pre-release
# runs when a tag v* is pushed
# creates a release draft with the binaries
on:
push:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- uses: lannonbr/vsce-action@master
with:
args: "package"
- name: Identify output file # can be retrieved as steps.filenames.outputs.file_out
id: filenames
run: echo "::set-output name=file_out::$(ls | grep "^.*\.vsix$" | head -1)"
- uses: actions/upload-artifact@v1
with:
name: ${{ steps.filenames.outputs.file_out }}
path: ${{ steps.filenames.outputs.file_out }}
pre-release:
name: Pre-Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
path: "artifacts/"
- name: Get version from tag
id: get_version
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\/v/}
- name: Create release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
title: "Development Build"
automatic_release_tag: "latest"
files: "artifacts/*/*"
prerelease: true
draft: false