Skip to content

Commit

Permalink
test publication
Browse files Browse the repository at this point in the history
  • Loading branch information
trdelnk committed Jun 15, 2024
1 parent 47cb47a commit c78dd61
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .github/kts/test.main.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env kotlin

println("Hello world")
34 changes: 20 additions & 14 deletions .github/workflows/publish-to-maven.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: Publish to Maven Central

on:
workflow_dispatch:
inputs:
version:
description: 'Library release version'
required: true
push:
branches:
- publish-to-maven

env:
NEW_VERSION: ${{ github.event.inputs.version }}
Expand All @@ -21,7 +18,7 @@ jobs:
strategy:
matrix:
include:
- os: macos-latest
# - os: macos-latest
- os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -30,6 +27,8 @@ jobs:

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v3
Expand All @@ -50,18 +49,25 @@ jobs:
~/.konan
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }}

# Нужна ли эта проверка?
- name: Ensure main branch
run: ./.github/sh/validate_publishing_branch.sh

- name: Validate library version update
run: ./.github/sh/validate_version_update.sh "libraryVersion" "$NEW_VERSION"
# - name: Validate library version update
# run: ./.github/sh/validate_version_update.sh "libraryVersion" "$NEW_VERSION"

# - name: Validate publishing
# run: |
# ./gradlew \
# -xtest \
# -xlint \
# publishToMavenLocal

- name: Setup kotlin
uses: fwilhe2/setup-kotlin@main

- name: Validate publishing
run: |
./gradlew \
-xtest \
-xlint \
publishToMavenLocal
- name: Bump version after release
run: ./github/kts/test.main.kts

# publish:
# env:
Expand Down

0 comments on commit c78dd61

Please sign in to comment.