Skip to content

Commit 8d68401

Browse files
Add pre-release
1 parent d48e3f1 commit 8d68401

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/pre-release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: pre-release
2+
3+
# runs when a tag v* is pushed
4+
# creates a release draft with the binaries
5+
6+
on:
7+
push:
8+
branches: ["master"]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- run: npm install
16+
- uses: lannonbr/vsce-action@master
17+
with:
18+
args: "package"
19+
- name: Identify output file # can be retrieved as steps.filenames.outputs.file_out
20+
id: filenames
21+
run: echo "::set-output name=file_out::$(ls | grep "^.*\.vsix$" | head -1)"
22+
- uses: actions/upload-artifact@v1
23+
with:
24+
name: ${{ steps.filenames.outputs.file_out }}
25+
path: ${{ steps.filenames.outputs.file_out }}
26+
27+
pre-release:
28+
name: Pre-Release
29+
needs: build
30+
runs-on: ubuntu-latest
31+
32+
steps:
33+
- name: Download artifacts
34+
uses: actions/download-artifact@v2
35+
with:
36+
path: "artifacts/"
37+
- name: Get version from tag
38+
id: get_version
39+
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\/v/}
40+
- name: Create release
41+
uses: marvinpinto/action-automatic-releases@latest
42+
with:
43+
repo_token: ${{ secrets.GITHUB_TOKEN }}
44+
title: "Development Build"
45+
automatic_release_tag: "latest"
46+
files: "artifacts/*/*"
47+
prerelease: true
48+
draft: false
49+

0 commit comments

Comments
 (0)