Update dependency com.squareup.okio:okio to v3.4.0 #1311
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
name: Pipeline | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: "Build, Test and Publish" | |
runs-on: ubuntu-latest | |
env: | |
TERM: xterm-256color | |
BATECT_CACHE_TYPE: directory | |
BATECT_ENABLE_TELEMETRY: true | |
GPG_KEY_ID: 6D76AD03 | |
OSSRH_USERNAME: kaml-github-actions | |
permissions: | |
contents: write # Required to be able to publish releases, see https://docs.github.com/en/rest/reference/permissions-required-for-github-apps#permission-on-contents | |
steps: | |
- name: Check out code | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Validate Batect wrapper scripts | |
uses: batect/[email protected] | |
- name: Cache Batect | |
uses: actions/[email protected] | |
with: | |
path: ~/.batect/cache | |
key: batect-${{ hashFiles('batect') }} | |
- name: Cache dependencies | |
uses: actions/[email protected] | |
id: cache-dependencies | |
with: | |
path: .batect/caches | |
key: batect-caches-${{ hashFiles('**/*.gradle.kts') }} | |
- name: Validate Gradle wrapper | |
uses: gradle/[email protected] | |
- name: Build | |
run: ./batect build | |
- name: Check | |
run: ./batect check | |
- name: Generate code coverage report | |
run: ./batect generateCodeCoverageReport | |
- name: Upload coverage to codecov.io | |
uses: codecov/[email protected] | |
- name: Assemble release | |
run: ./batect assembleRelease | |
env: | |
GPG_KEY_RING: ${{ secrets.GPG_KEY_RING }} | |
GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }} | |
if: github.repository == 'charleskorn/kaml' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push' | |
- name: Publish snapshot | |
run: ./batect publishSnapshot | |
env: | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
GPG_KEY_RING: ${{ secrets.GPG_KEY_RING }} | |
GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }} | |
if: github.repository == 'charleskorn/kaml' && github.ref == 'refs/heads/main' && github.event_name == 'push' | |
- name: Publish release | |
run: ./batect publishRelease | |
env: | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
GPG_KEY_RING: ${{ secrets.GPG_KEY_RING }} | |
GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }} | |
if: github.repository == 'charleskorn/kaml' && startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' | |
- name: Create GitHub release | |
uses: softprops/[email protected] | |
with: | |
files: build/release/* | |
fail_on_unmatched_files: true | |
draft: true # Update draft release with matching tag, if there is one. | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: github.repository == 'charleskorn/kaml' && startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' | |
- name: Clean up dependencies before caching | |
if: steps.cache-dependencies.outputs.cache-hit != 'true' | |
run: | | |
rm -rf .batect/caches/gradle-cache/caches/modules-2/modules-2.lock | |
rm -rf .batect/caches/gradle-cache/caches/*/plugin-resolution/ | |
rm -rf .batect/caches/gradle-cache/caches/*/scripts/ | |
rm -rf .batect/caches/gradle-cache/caches/*/scripts-remapped/ | |
rm -rf .batect/caches/gradle-cache/caches/*/fileHashes/ | |
rm -rf .batect/caches/gradle-cache/caches/*/fileContent/*.lock | |
rm -rf .batect/caches/gradle-cache/caches/*/javaCompile/*.lock | |
rm -rf .batect/caches/gradle-cache/caches/*/executionHistory/*.lock | |
rm -rf .batect/caches/gradle-cache/caches/*/generated-gradle-jars/*.lock | |
rm -rf .batect/caches/gradle-cache/caches/jars-*/*.lock | |
rm -rf .batect/caches/gradle-cache/caches/transforms-1/transforms-1.lock | |
rm -rf .batect/caches/gradle-cache/caches/journal-1/file-access.bin | |
rm -rf .batect/caches/gradle-cache/caches/journal-1/*.lock | |
rm -rf .batect/caches/gradle-cache/daemon/*/*.lock | |
rm -rf .batect/caches/gradle-cache/daemon/*/*.log | |
rm -rf .batect/caches/gradle-cache/kotlin-profile/* |