Skip to content

Commit ff7a1c0

Browse files
Migrate to GitHub Actions (#579)
* Migrate to GitHub Actions * Add badges to README * Update .github/workflows/ci.yaml * Update .github/workflows/ci.yaml Co-authored-by: João Moreno <[email protected]>
1 parent 3ccb7e1 commit ff7a1c0

File tree

3 files changed

+45
-28
lines changed

3 files changed

+45
-28
lines changed

.github/workflows/ci.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [**]
6+
tags: [v*]
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
test:
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
node-version: [10, 12, 14]
16+
fail-fast: false
17+
runs-on: ${{ matrix.os }}
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v2
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
- run: npm install
25+
- run: npm run build
26+
- run: npm test
27+
28+
publish:
29+
needs: test
30+
if: startsWith(github.ref, 'refs/tags/v')
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v2
34+
- name: Use Node.js 14
35+
uses: actions/setup-node@v2
36+
with:
37+
node-version: 14
38+
registry-url: 'https://registry.npmjs.org'
39+
- run: npm install
40+
- run: npm run build
41+
- run: npm publish
42+
env:
43+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
> _The Visual Studio Code Extension Manager_
44
5-
[![Build Status](https://dev.azure.com/vscode/VSCE/_apis/build/status/VSCE?branchName=main)](https://dev.azure.com/vscode/VSCE/_build/latest?definitionId=16&branchName=main) [![npm version](https://badge.fury.io/js/vsce.svg)](https://badge.fury.io/js/vsce)
5+
[![ci](https://github.com/microsoft/vsce/workflows/ci/badge.svg)](https://github.com/microsoft/vsce/actions?query=workflow%3Aci)
6+
[![Version](https://img.shields.io/npm/v/vsce.svg)](https://npmjs.org/package/vsce)
67

78
## Requirements
89

azure-pipelines.yml

-27
This file was deleted.

0 commit comments

Comments
 (0)