Skip to content

Commit

Permalink
Export Kotin Files
Browse files Browse the repository at this point in the history
  • Loading branch information
ksharma-xyz committed Jun 30, 2024
1 parent 9933e4b commit abde263
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/gen-kotlin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,41 @@ jobs:
- name: Run generateProtos Task
run: ./gradlew generateProtos

export-files:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Generate Protos
run: ./gradlew generateProtos

- name: Upload generated files
uses: actions/upload-artifact@v3
with:
name: generated-kotlin-files
path: build/generated/source/wire/*.kt

- name: Push to separate repo (replace with your details)
uses: actions/checkout@v4
with:
repository: 'ksharma/Kotlin-Proto' # Target repo
token: ${{ secrets.TOKEN }} # Use secret for authentication
# env:
# GITHUB_PAT: ${{ secrets.TOKEN }} # Optional environment variable for PAT

- name: Configure Git
run: |
git config user.name 'Karan Sharma'
git config user.email '[email protected]'
- name: Create a new branch
run: git checkout -b kotlinfiles
- name: Create Commit
run: |
# cd kotlin # Optional if artifacts are in a subdirectory
git add .
git commit -m "Add generated Kotlin files from main project"

- name: Push changes to target repo
run: git push origin ${{ steps.checkout-target-repo.outputs.branch }}
2 changes: 0 additions & 2 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.fir.declarations.builder.buildScript

/*
* This file was generated by the Gradle 'init' task.
*
Expand Down

0 comments on commit abde263

Please sign in to comment.