Skip to content

Commit 3cd2ecc

Browse files
Add github action for releases
1 parent 2d5a996 commit 3cd2ecc

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/release.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: main
2+
3+
# runs when a tag v* is pushed
4+
# creates a release draft with the binaries
5+
6+
on:
7+
push:
8+
tags: ["v*"]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
env:
14+
VSIX_FILE: r-debugger.vsix
15+
steps:
16+
- uses: actions/checkout@v2
17+
- run: npm install
18+
- uses: lannonbr/vsce-action@master
19+
with:
20+
args: "package -o $VSIX_FILE"
21+
- uses: actions/upload-artifact@v1
22+
with:
23+
name: ${{ env.VSIX_FILE }}
24+
path: ${{ env.VSIX_FILE }}
25+
lint:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v2
29+
- uses: actions/setup-node@v1
30+
with:
31+
node-version: "13.x"
32+
- run: npm install
33+
- run: npm run lint
34+
35+
release:
36+
name: Release
37+
timeout-minutes: 30
38+
needs: build
39+
runs-on: ubuntu-latest
40+
41+
steps:
42+
- name: Download artifacts
43+
uses: actions/download-artifact@v2
44+
with:
45+
path: "artifacts/"
46+
- name: Get version from tag
47+
id: get_version
48+
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\/v/}
49+
- name: Create release
50+
uses: marvinpinto/action-automatic-releases@latest
51+
with:
52+
repo_token: ${{ secrets.GITHUB_TOKEN }}
53+
title: Version ${{ steps.get_version.outputs.version }}
54+
files: "artifacts/*/*"
55+
draft: true # add R binaries and change description before release
56+

0 commit comments

Comments
 (0)