Skip to content

Commit

Permalink
Enhancing publishing mechanism and adding snapshot releases (#258)
Browse files Browse the repository at this point in the history
### What's done:
- Added snapshots
- Removed dummy useless release configurations
  • Loading branch information
orchestr7 authored Feb 11, 2024
1 parent db6d3e2 commit ecbdec2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 34 deletions.
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

0 comments on commit ecbdec2

Please sign in to comment.