Skip to content

Commit

Permalink
Merge pull request #143 from xsnippet/gh-actions
Browse files Browse the repository at this point in the history
[CI] Replace Travis CI with GitHub Actions
  • Loading branch information
lotrien authored Jan 9, 2021
2 parents 64e2e99 + 504c7a6 commit 7c25881
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 28 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
push:
tags:
- 'v[1-9]+.[0-9]+.[0-9]+*'

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: |
npm install
npm run build
tar cvzf bundle.tar.gz -C dist/ .
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bundle.tar.gz
asset_name: xsnippet_web-${{ github.ref }}.tar.gz
asset_content_type: application/gzip
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Tests

on:
- push
- pull_request

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: |
npm install
npm run lint
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: |
npm install
npm run test
build:
needs: [lint, test]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: |
npm install
npm run build
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

0 comments on commit 7c25881

Please sign in to comment.