Skip to content

Commit

Permalink
Use GitHub Actions instead of Travis CI
Browse files Browse the repository at this point in the history
This change uses GitHub Actions to automate the release process as much
as possible.
  • Loading branch information
lhchavez committed Jul 12, 2020
1 parent 4c558bb commit b9a18e0
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 12 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on:
pull_request: {}
push:
branches:
- master

jobs:

test:
name: CI

runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt-get install -y \
fp-compiler-3.0.4
- name: Compile
run: sbt test:compile

- name: Test
run: sbt test
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release

on:
push:
branches:
- master

jobs:

release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Bump version and push tag
id: bump-version
uses: anothrNick/github-tag-action@c170e78287f338a4af0dc49e033e50e5a072d82b
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
INITIAL_VERSION: 1.0.0

- name: Package
run: |
sbt proguard:proguard
mv ./target/scala-2.11/proguard/libinteractive_2.11-*.jar \
./target/scala-2.11/proguard/libinteractive.jar
- name: Create Release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.bump-version.outputs.tag }}
release_name: ${{ steps.bump-version.outputs.tag }}
draft: false
prerelease: false

- name: Upload libinteractive.jar Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./target/scala-2.11/proguard/libinteractive.jar
asset_name: libinteractive.jar
asset_content_type: application/octet-stream
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

0 comments on commit b9a18e0

Please sign in to comment.