diff --git a/.github/kts/test.main.kts b/.github/kts/test.main.kts new file mode 100755 index 0000000..c523abf --- /dev/null +++ b/.github/kts/test.main.kts @@ -0,0 +1,3 @@ +#!/usr/bin/env kotlin + +println("Hello world") diff --git a/.github/workflows/publish-to-maven.yml b/.github/workflows/publish-to-maven.yml index 3ee9938..4ff090f 100644 --- a/.github/workflows/publish-to-maven.yml +++ b/.github/workflows/publish-to-maven.yml @@ -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 }} @@ -21,7 +18,7 @@ jobs: strategy: matrix: include: - - os: macos-latest +# - os: macos-latest - os: ubuntu-latest runs-on: ${{ matrix.os }} steps: @@ -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 @@ -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: