Skip to content

1.29.6

1.29.6 #4

Workflow file for this run

name: Released
on:
release:
types: [released]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Get Release
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- name: Checkout tools repo
uses: actions/checkout@v4
with:
repository: mysteriumnetwork/mysterium-mobile-provider
ref: 'master'
path: mobile-app
token: ${{ secrets.REPO_TOKEN }}
- name: Update version
run: |
APP_VERSION=$(echo "$(grep "versionName" "./mobile-app/android/app/build.gradle.kts" | awk -F '"' '{print $2}')" + 0.1 | bc)
sed -i -E "/versionName\s*=\s*\"[0-9]+\.[0-9]+\"/s/\"[0-9]+\.[0-9]+\"/\"$APP_VERSION\"/" "./mobile-app/android/app/build.gradle.kts"
sed -i -E "/node\s*=\s*\"[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?\"/s/\"[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?\"/\"${{ env.RELEASE_VERSION }}\"/" "./mobile-app/android/gradle/libs.versions.toml"
- name: Pushes to another repository
id: push_directory
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.REPO_TOKEN }}
with:
source-directory: mobile-app
destination-github-username: 'mysteriumnetwork'
destination-repository-name: 'mysterium-mobile-provider'
user-email: [email protected]
commit-message: Create release version ${{ env.RELEASE_VERSION }}
target-branch: master
- name: "Call Bitrise API"
uses: indiesdev/[email protected]
with:
url: https://api.bitrise.io/v0.1/apps/${{ secrets.BITRISE_APP_ID }}/builds
method: "POST"
id: api
accept: 200, 201
headers: '{ "accept": "application/json", "Authorization": "${{ secrets.BITRISE_TOKEN }}", "Content-Type": "application/json" }'
body: '{ "hook_info": {"type": "bitrise"}, "build_params": {"branch":"master", "workflow_id":"build"}}'
timeout: 10000
log-response: true
- name: "Bitrise response"
run: echo ${{ steps.api.outputs.response }}