Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
vendelieu committed Aug 7, 2024
1 parent 683b613 commit 4971627
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 64 deletions.
33 changes: 32 additions & 1 deletion .github/workflows/ci.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,39 @@ on:
push:
branches:
- master
- dev
paths-ignore:
- '.github/**'
- 'assets/**'
- 'kotlin-js-store/**'
- '.editorconfig'
- '.gitignore'
- 'CHANGELOG.md'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'FUNDING.yml'
- 'LICENSE'
- 'README.md'
- 'detekt.yml'
- 'gradlew'
- 'gradlew.bat'
- 'renovate.json'
pull_request:
paths-ignore:
- '.github/**'
- 'assets/**'
- 'kotlin-js-store/**'
- '.editorconfig'
- '.gitignore'
- 'CHANGELOG.md'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'FUNDING.yml'
- 'LICENSE'
- 'README.md'
- 'detekt.yml'
- 'gradlew'
- 'gradlew.bat'
- 'renovate.json'

permissions:
contents: write
Expand Down
File renamed without changes.
27 changes: 0 additions & 27 deletions .github/workflows/ci.docs.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/ci.gh.snap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: GH Packages Autorelease

on:
push:
paths:
- 'telegram-bot/**'
- 'ksp/**'
- 'webapps/**'
- 'ktgram-utils/**'
- 'ktor-starter/**'
- 'spring-ktgram-starter/**'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11

- name: Get build version
id: version
run: |
echo "git_branch=${GITHUB_REF#refs/heads/}" >> "$GITHUB_ENV"
echo "git_hash=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
echo "date=$(date +'%y%m%d')" >> "$GITHUB_ENV"
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3-beta
with:
gradle-version: current

- name: Publish to Gh
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: ./gradlew publishAllPublicationsToGHPackagesRepository -PlibVersion=${{ env.git_branch }}-${{ env.date }}~${{ env.git_hash }}
42 changes: 42 additions & 0 deletions .github/workflows/ci.pkg.cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Packages Cleanup

on:
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:

jobs:
cleanup:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
strategy:
matrix:
package_name: [
"eu.vendeli.telegram-bot-jvm",
"eu.vendeli.telegram-bot",
"eu.vendeli.ksp",
"eu.vendeli.ksp-jvm",
"eu.vendeli.ktor-starter-jvm",
"eu.vendeli.ktor-starter",
"eu.vendeli.ktgram-utils-js",
"eu.vendeli.ktgram-utils-jvm",
"eu.vendeli.ktgram-utils",
"eu.vendeli.ktgram-utils-linuxx64",
"eu.vendeli.ktgram-utils-mingwx64",
"eu.vendeli.spring-ktgram-starter",
"eu.vendeli.spring-ktgram-starter-jvm",
"eu.vendeli.telegram-bot-js",
"eu.vendeli.telegram-bot-linuxx64",
"eu.vendeli.telegram-bot-mingwx64",
"eu.vendeli.webapps",
"eu.vendeli.webapps-js"
]
steps:
- name: Delete old versions of ${{ matrix.package_name }}
uses: actions/[email protected]
with:
package-type: maven
package-name: ${{ matrix.package_name }}
min-versions-to-keep: 10
35 changes: 0 additions & 35 deletions .github/workflows/ci.pre.release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
--output /home/runner/work/secret.gpg publish_key.gpg
- name: Publish with Gradle
run: ./gradlew publish -Psigning.secretKeyRingFile=/home/runner/work/secret.gpg -Psigning.keyId=${{secrets.SIGNING_KEYID}} -Psigning.password=${{secrets.SIGNING_PASSWORD}} -PsonatypeUsername=${{secrets.SONATYPE_USERNAME}} -PsonatypePassword=${{secrets.SONATYPE_PASSWORD}} -PlibVersion=${{ needs.version.outputs.version }}
run: ./gradlew publishAllPublicationsToOSSRHRepository -Psigning.secretKeyRingFile=/home/runner/work/secret.gpg -Psigning.keyId=${{secrets.SIGNING_KEYID}} -Psigning.password=${{secrets.SIGNING_PASSWORD}} -PsonatypeUsername=${{secrets.SONATYPE_USERNAME}} -PsonatypePassword=${{secrets.SONATYPE_PASSWORD}} -PlibVersion=${{ needs.version.outputs.version }}

readme:
needs: [version, publish]
Expand Down

0 comments on commit 4971627

Please sign in to comment.