-
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.
Updates CI workflows and bumps action versions (#22)
* update lint version, remove dup asset checksum * split workflow jobs * split lint,test,release workflows
- Loading branch information
Showing
5 changed files
with
104 additions
and
82 deletions.
There are no files selected for viewing
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,26 @@ | ||
name: Lint | ||
# Lint workflow runs Kotlin linter (ktlint) on the code base. | ||
|
||
# This workflow is run on every pull request and push to main. | ||
# If no *.kt files are changed it will pass without running as these are required checks. | ||
on: | ||
pull_request: | ||
paths: | ||
- "**/*.kt" | ||
- "*.gradle.kts" | ||
- ".github/workflows/lint.yml" | ||
push: | ||
branches: | ||
- main | ||
|
||
# concurrency is not defined in here because this job usually doesn't | ||
# run long enough to need cancelling, and it's okay for it to run multiple | ||
# times for the same PR. | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Lint | ||
uses: vroy/gha-kotlin-linter@v4 |
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,43 @@ | ||
name: Release | ||
# Release workflow builds and releases distribution artifacts. | ||
|
||
# This workflow is run on pushes to master & every Pull Request, | ||
# if no *.kt files are changed it will pass without running as these are required checks | ||
on: | ||
push: | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+" # Push events to matching #.#.#, i.e. 1.0, 20.15.10 | ||
- "[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching #.#.#-rc#, i.e. 1.0-rc1, 20.15.10-rc5 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/[email protected] | ||
with: | ||
distribution: temurin | ||
java-version: 11 | ||
- name: Set tag version | ||
run: | | ||
echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
- name: Defined tag version | ||
run: | | ||
echo VERSION=$VERSION | ||
- name: Build artifacts | ||
uses: gradle/[email protected] | ||
with: | ||
arguments: assembleDist | ||
- name: Upload artifacts | ||
- uses: ncipollo/release-action@v1 | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
artifacts: "build/distributions/*" | ||
bodyFile: "RELEASE_CHANGELOG.md" |
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,35 @@ | ||
name: Test | ||
# Test workflow runs unit tests and uploads a code coverage report. | ||
|
||
# This workflow is run on every pull request and push to main. | ||
# If no *.kt files are changed it will pass without running as these are required checks. | ||
on: | ||
pull_request: | ||
paths: | ||
- "**/*.kt" | ||
- "*.gradle.kts" | ||
- ".github/workflows/test.yml" | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/[email protected] | ||
with: | ||
distribution: temurin | ||
java-version: 11 | ||
- name: Test | ||
uses: gradle/[email protected] | ||
with: | ||
arguments: test | ||
- uses: codecov/[email protected] | ||
with: | ||
directory: "build/reports" |
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