Skip to content

Commit

Permalink
Update dependencies and migrate to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pmendelski committed Nov 10, 2020
1 parent 33a113c commit 6977c93
Show file tree
Hide file tree
Showing 17 changed files with 170 additions and 203 deletions.
5 changes: 3 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ indent_style = space
[*.{kt,kts}]
max_line_length = 140
indent_size = 4
# Import ordering bug: https://github.com/pinterest/ktlint/issues/527
disabled_rules=import-ordering

[*.{yml, json}]
indent_size = 2
85 changes: 85 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Build

on: [ push ]

jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Parse Changelog Entry
id: changelog
uses: coditory/changelog-parser@v1
- name: Get last version
id: lasttag
shell: bash
run: echo ::set-output name=version::$(git describe --abbrev=0 --tags --match 'v[0-9]*\.[0-9]*\.[0-9]*' | cut -c2-)
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build with Gradle
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: ./gradlew build jacocoTestReport coveralls --scan --stacktrace
- name: Publish Reports Artifact
uses: actions/upload-artifact@v2
if: always()
with:
name: Reports
path: build/reports
- name: Release
if: "github.ref == 'refs/heads/master' && steps.changelog.outputs.version != steps.lasttag.outputs.version"
env:
PREV_VERSION: ${{ steps.lasttag.outputs.version }}
NEXT_VERSION: ${{ steps.changelog.outputs.version }}
shell: bash
run: |
git config user.name "Coditory CI"
git config user.email "Coditory CI <admin@coditory.com>"
if [ -n "$PREV_VERSION" ]; then
declare -r ESC_PREV_VERSION="${PREV_VERSION//./\\.}"
sed -i "s|^ *version *= *${ESC_PREV_VERSION} *$|version=${NEXT_VERSION}|" gradle.properties
sed -i "s|\"${ESC_PREV_VERSION}\"|\"${NEXT_VERSION}\"|" README.md
sed -i "s|'${ESC_PREV_VERSION}'|'${NEXT_VERSION}'|" README.md
sed -i "s|v${ESC_PREV_VERSION}|v${NEXT_VERSION}|" README.md
if [ -n "$(git status --porcelain)" ]; then
git add -A
git commit -a -m "Release v${NEXT_VERSION}" -m "[ci-skip]"
git push origin master
fi
fi
git tag -f "v${NEXT_VERSION}"
git push origin --tags
- name: Publish to Gradle Plugin Portal
if: "github.ref == 'refs/heads/master' && steps.changelog.outputs.version != steps.lasttag.outputs.version"
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
run: |
./gradlew publishPlugins \
-Pgradle.publish.key=$GRADLE_PUBLISH_KEY \
-Pgradle.publish.secret=$GRADLE_PUBLISH_SECRET
- name: Create GitHub Release
if: "github.ref == 'refs/heads/master' && steps.changelog.outputs.version != steps.lasttag.outputs.version"
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: ${{ steps.changelog.outputs.description }}
tag_name: v${{ steps.changelog.outputs.version }}
release_name: Release v${{ steps.changelog.outputs.version }}
11 changes: 10 additions & 1 deletion .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 0 additions & 44 deletions .scripts/release.sh

This file was deleted.

7 changes: 0 additions & 7 deletions .scripts/travis/coverage.sh

This file was deleted.

46 changes: 0 additions & 46 deletions .scripts/travis/release.sh

This file was deleted.

29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

## [Unreleased]

## [0.1.6] - 2020-08-18
### Changed
- Update manifest plugin.

[Unreleased]: https://github.com/coditory/gradle-build-plugin/compare/v0.1.6...HEAD
[1.1.6]: https://github.com/coditory/gradle-build-plugin/compare/v0.1.5...v0.1.6
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Paweł Mendelski

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 3 additions & 4 deletions readme.md → README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Build Gradle Plugin

[![Join the chat at https://gitter.im/coditory/gradle-build-plugin](https://badges.gitter.im/coditory/gradle-build-plugin.svg)](https://gitter.im/coditory/gradle-integration-test-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.com/coditory/gradle-build-plugin.svg?branch=master)](https://travis-ci.com/coditory/gradle-build-plugin)
[![Coverage Status](https://coveralls.io/repos/github/coditory/gradle-build-plugin/badge.svg)](https://coveralls.io/github/coditory/gradle-build-plugin)
[![Build Status](https://github.com/coditory/gradle-build-plugin/workflows/Build/badge.svg?branch=master)](https://github.com/coditory/gradle-build-plugin/actions?query=workflow%3ABuild+branch%3Amaster)
[![Coverage Status](https://coveralls.io/repos/github/coditory/gradle-build-plugin/badge.svg?branch=master)](https://coveralls.io/github/coditory/gradle-build-plugin?branch=master)
[![Gradle Plugin Portal](https://img.shields.io/badge/Plugin_Portal-v0.1.6-green.svg)](https://plugins.gradle.org/plugin/com.coditory.build)
[![Join the chat at https://gitter.im/coditory/gradle-build-plugin](https://badges.gitter.im/coditory/gradle-build-plugin.svg)](https://gitter.im/coditory/gradle-integration-test-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

This plugin adds typical build configuration for JVM projects:
- [manifest generation](https://github.com/coditory/gradle-manifest-plugin)
Expand Down
Loading

0 comments on commit 6977c93

Please sign in to comment.