Skip to content

2.1.0-Beta2-1.0.26 #122

2.1.0-Beta2-1.0.26

2.1.0-Beta2-1.0.26 #122

Workflow file for this run

# Workflow to build release artifacts
name: release artifacts
on:
release:
types: [ created ]
jobs:
build-and-test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: Setup Java 17
uses: actions/[email protected]
with:
java-version: '17'
java-package: jdk
architecture: x64
# Checkout
- uses: actions/checkout@v2
# Build cache
- name: Cache Gradle Cache
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('**/gradle.properties') }}
# An ordered list of keys to use for restoring the cache if no cache hit occurred for key
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache gradle wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
# Run tests
- name: test
shell: bash
run: ./gradlew --stacktrace --info test
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-reports-${{ runner.os }}
path: |
compiler-plugin/build/reports
integration-tests/build/reports
gradle-plugin/build/reports
common-util/build/reports
# Build KSP artifacts
- name: build
run: |
REF=${{ github.ref }} # refs/tags/$KSP_VERSION
./gradlew --info -PkspVersion=${REF:10} -PoutRepo=$(pwd)/build/repos/release publishAllPublicationsToMavenRepository
- name: pack
run: cd build/repos/release/ && zip -r ../../artifacts.zip .
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/artifacts.zip
asset_name: artifacts.zip
asset_content_type: application/zip