Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancing publishing mechanism and adding snapshot releases #258

Merged
merged 3 commits into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ on:
branches:
- 'main'

env:
GRADLE_OPTS: -Dorg.gradle.daemon=true -Dorg.gradle.parallel=true -Dorg.gradle.welcome=never
PGP_SEC: ${{ secrets.PGP_SEC }}
PGP_PASSWORD: ${{ secrets.PGP_PASSWORD }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

jobs:
build_and_test_with_code_coverage:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
os: [ macos-latest ]

steps:
# actions/checkout v1.* is needed for correct codecov upload, see https://github.com/actions/checkout/issues/237 for details
Expand Down Expand Up @@ -56,3 +63,14 @@ jobs:
with:
flags: unittests
fail_ci_if_error: true # optional (default = false)
- name: 'Publish a snapshot'
id: publish
if: ${{ github.event_name == 'push' && github.ref_type == 'branch' && github.ref == 'refs/heads/main' }}
uses: gradle/gradle-build-action@v3
with:
gradle-version: wrapper
arguments: |
publish
-Preckon.stage=snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 0 additions & 11 deletions ktoml-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,6 @@ kotlin {
}
}

publishing {
publications {
create<MavenPublication>("maven") {
groupId = "com.akuleshov7"
artifactId = "ktoml-core"
version = version
from(components["kotlin"])
}
}
}

configureSigning()

tasks.withType<KotlinJvmTest> {
Expand Down
11 changes: 0 additions & 11 deletions ktoml-file/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,6 @@ kotlin {
}
}

publishing {
publications {
create<MavenPublication>("maven") {
groupId = "com.akuleshov7"
artifactId = "ktoml-file"
version = version
from(components["kotlin"])
}
}
}

configureSigning()

tasks.withType<KotlinJvmTest> {
Expand Down
11 changes: 0 additions & 11 deletions ktoml-source/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,6 @@ kotlin {
}
}

publishing {
publications {
create<MavenPublication>("maven") {
groupId = "com.akuleshov7"
artifactId = "ktoml-source"
version = version
from(components["kotlin"])
}
}
}

configureSigning()

tasks.withType<KotlinJvmTest> {
Expand Down
Loading