-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependencies and migrate to github actions
- Loading branch information
1 parent
33a113c
commit 6977c93
Showing
17 changed files
with
170 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.