Skip to content

Commit 79b320a

Browse files
authored
Merge pull request #7 from metafacture/5-migrateToGithubActions
Migrate from Travis CI to GitHub actions
2 parents 67cace6 + 7b1926e commit 79b320a

File tree

3 files changed

+65
-7
lines changed

3 files changed

+65
-7
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Set up JDK 1.8
11+
uses: actions/setup-java@v1
12+
with:
13+
java-version: 1.8
14+
- name: Grant execute permission for gradlew
15+
run: chmod +x gradlew
16+
- name: Build with Gradle
17+
run: ./gradlew build
18+
- name: Install language server
19+
run: ./gradlew installServer
20+
- name: Change directory
21+
run: cd org.metafacture.flux.vsc/
22+
- name: Install flux extension
23+
run: npm install

.github/workflows/deploy.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
name: Build and Deploy
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build-and-deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Node.js
15+
uses: actions/setup-node@v1
16+
- name: Set up vsce
17+
run: npm install -g vsce
18+
- name: Set up JDK 1.8
19+
uses: actions/setup-java@v1
20+
with:
21+
java-version: 1.8
22+
- name: Build with Gradle
23+
run: |
24+
chmod +x gradlew
25+
./gradlew build
26+
./gradlew installServer
27+
- name: Create flux extension
28+
working-directory: org.metafacture.flux.vsc/
29+
run: |
30+
npm install
31+
vsce package -o flux.vsix
32+
- name: Pushes vsix to GitHub Pages
33+
uses: dmnemec/copy_file_to_another_repo_action@v1.0.4
34+
env:
35+
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
36+
with:
37+
source_file: 'org.metafacture.flux.vsc/flux.vsix'
38+
destination_repo: 'metafacture/metafacture.github.io'
39+
destination_branch: main
40+
destination_folder: 'extensions'
41+
user_email: '${{ github.actor }}@users.noreply.github.com'
42+
user_name: '${{ github.actor }}'

.travis.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)