Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
env:
PACKAGE_VERSION: ${{ github.event.inputs.packageVersion }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- run: git pull origin main --ff-only

Expand All @@ -39,4 +41,19 @@ jobs:
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSPHRASE }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }}
run: ./gradlew lexfloatclient:publishAndReleaseToMavenCentral -PlexVersion=${{github.event.inputs.packageVersion}} --info --warning-mode all
run: ./gradlew lexfloatclient:publishAndReleaseToMavenCentral -PlexVersion=${{ env.PACKAGE_VERSION }} --info --warning-mode all

- name: Extract version and create tag
Comment thread
mir-huzaif marked this conversation as resolved.
run: |
git tag "${{ env.PACKAGE_VERSION }}" 2>/dev/null || echo "Tag already exists"
git push origin "${{ env.PACKAGE_VERSION }}" || true
Comment thread
mir-huzaif marked this conversation as resolved.

- name: Notify slack releases channel
uses: slackapi/slack-github-action@v2
Comment thread
mir-huzaif marked this conversation as resolved.
with:
webhook: ${{ secrets.SLACK_RELEASES_PROD_WEBHOOK_URL }}
webhook-type: webhook-trigger
payload: |
status: "${{ job.status }}"
environment: "PRODUCTION"
project: "LexFloatClient Android"
Comment thread
mir-huzaif marked this conversation as resolved.
Comment thread
mir-huzaif marked this conversation as resolved.
32 changes: 18 additions & 14 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,27 @@ jobs:

update-version:
runs-on: ubuntu-latest
env:
LIBRARY_VERSION: ${{ github.event.inputs.libraryVersion }}
PACKAGE_VERSION: ${{ github.event.inputs.packageVersion }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Create new branch
run: git checkout -b release/${{ github.event.inputs.packageVersion }}
uses: actions/checkout@v4

- name: Update Version
run: |
sed -i '/VERSION=/!b;cVERSION=\"v${{ github.event.inputs.libraryVersion }}";' ./download-libs.sh
- name: Commit, Tag and Push
run: |
git add ./download-libs.sh
git config user.name github-actions
git config user.email github-actions@github.com
git commit -m "updated version" | exit 0
git tag ${{ github.event.inputs.packageVersion }}
git push --set-upstream origin release/${{ github.event.inputs.packageVersion }}
git push --tags
sed -i -E 's/^([[:space:]]*)VERSION="[^"]*"/\1VERSION="v${{ env.LIBRARY_VERSION }}"/' ./download-libs.sh

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
branch: ci/${{ env.PACKAGE_VERSION }}
title: "chore: bump package version to ${{ env.PACKAGE_VERSION }}"
commit-message: "chore(package version): updated version"
body: |
Automated package version bump.
base: main
add-paths: |
./download-libs.sh