Skip to content

Commit fe9b62b

Browse files
author
Armin Schrenk
committed
switch from travis ci to github actions
1 parent 1f51991 commit fe9b62b

3 files changed

Lines changed: 64 additions & 25 deletions

File tree

.github/workflows/build.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build
2+
3+
on:
4+
[push]
5+
6+
jobs:
7+
build:
8+
name: Build and Test
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-java@v1
13+
with:
14+
java-version: 14
15+
- uses: actions/cache@v1
16+
with:
17+
path: ~/.m2/repository
18+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
19+
restore-keys: |
20+
${{ runner.os }}-maven-
21+
- name: Ensure to use tagged version
22+
run: mvn versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/} # use shell parameter expansion to strip of 'refs/tags'
23+
if: startsWith(github.ref, 'refs/tags/')
24+
- name: Build and Test
25+
run: mvn -B install
26+
- name: Upload cryptomator-cli-XXX.jar
27+
uses: actions/upload-artifact@v1
28+
with:
29+
name: cryptomator-cli.jar
30+
path: target/cryptomator-cli-*.jar
31+
32+
release:
33+
name: Draft a Release on GitHub Releases
34+
runs-on: ubuntu-latest
35+
needs: build
36+
if: startsWith(github.ref, 'refs/tags/')
37+
steps:
38+
- name: Download cryptomator-cli.jar
39+
uses: actions/download-artifact@v1
40+
with:
41+
name: cryptomator-cli.jar
42+
path: .
43+
- name: Create Release
44+
id: create_release
45+
uses: actions/create-release@v1
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
with:
49+
tag_name: ${{ github.ref }}
50+
release_name: ${{ github.ref }}
51+
body: |
52+
:construction: Work in Progress
53+
draft: true
54+
prerelease: false
55+
- name: Upload cryptomator-cli.jar to GitHub Releases
56+
uses: actions/upload-release-asset@v1.0.1
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
with:
60+
upload_url: ${{ steps.create_release.outputs.upload_url }}
61+
asset_path: cryptomator-cli.jar
62+
asset_name: cryptomator-cli-${{ github.ref }}.jar
63+
asset_content_type: application/jar

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/cryptomator/cli.svg?branch=develop)](https://travis-ci.org/cryptomator/cli)
1+
[![Build](https://github.com/cryptomator/cli/workflows/Build/badge.svg)](https://github.com/cryptomator/cli/actions?query=workflow%3ABuild)
22
[![Latest Release](https://img.shields.io/github/release/cryptomator/cli/all.svg)](https://github.com/cryptomator/cli/releases/latest)
33

44
# Cryptomator CLI

0 commit comments

Comments
 (0)