2022-09-20 17:39:49 +00:00
|
|
|
|
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "v*.*.*"
|
|
|
|
|
2023-05-29 18:22:41 +00:00
|
|
|
permissions: write-all
|
|
|
|
|
2022-09-20 17:39:49 +00:00
|
|
|
jobs:
|
|
|
|
check-versions:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
semver: ${{ steps.validate.outputs.semver }}
|
|
|
|
steps:
|
|
|
|
- name: 'Checkout'
|
2023-09-11 16:00:32 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-09-20 17:39:49 +00:00
|
|
|
- name: 'Validate versions match (tag, backend, frontend, Android)'
|
|
|
|
id: validate
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
semver=$(git describe --tags --abbrev=0)
|
|
|
|
IFS=-
|
|
|
|
read -ra semverArray <<< $semver
|
|
|
|
tagV=$(echo ${semverArray[0]} | sed 's/v//')
|
|
|
|
clientV=$(jq -r .version frontend/package.json)
|
2022-10-06 10:53:03 +00:00
|
|
|
androidV=$(grep -oP '(?<=versionName ").*?((?=\-)|$)' mobile/android/app/build.gradle)
|
2022-09-20 17:39:49 +00:00
|
|
|
coordinatorV=$(jq -r .major version.json).$(jq -r .minor version.json).$(jq -r .patch version.json)
|
|
|
|
|
|
|
|
printf "Client version: ${clientV}\nCoordinator version: ${coordinatorV}\nGit tag version: ${tagV}\n"
|
|
|
|
|
2022-10-06 10:53:03 +00:00
|
|
|
if [ "$coordinatorV" = "$clientV" ] && [ "$coordinatorV" = "$tagV" ] && [ "$coordinatorV" = "$androidV" ]; then
|
2022-09-20 17:39:49 +00:00
|
|
|
echo "Versions match!"
|
2024-03-17 15:02:43 +00:00
|
|
|
echo '::set-output name=semver::'$semver
|
2022-09-20 17:39:49 +00:00
|
|
|
else
|
|
|
|
echo "Versions do not match! You might have forgotten to update the version on a component."; exit $ERRCODE;
|
|
|
|
fi
|
2022-10-25 18:04:12 +00:00
|
|
|
|
2022-09-20 17:39:49 +00:00
|
|
|
frontend-build:
|
2023-05-09 13:07:16 +00:00
|
|
|
uses: RoboSats/robosats/.github/workflows/frontend-build.yml@main
|
2022-09-20 17:39:49 +00:00
|
|
|
needs: check-versions
|
|
|
|
with:
|
|
|
|
semver: ${{ needs.check-versions.outputs.semver }}
|
2022-10-25 18:04:12 +00:00
|
|
|
|
2024-01-22 10:34:19 +00:00
|
|
|
integration-tests:
|
|
|
|
uses: RoboSats/robosats/.github/workflows/integration-tests.yml@main
|
|
|
|
needs: [frontend-build, check-versions]
|
|
|
|
|
2022-09-20 17:39:49 +00:00
|
|
|
coordinator-image:
|
2023-05-09 13:07:16 +00:00
|
|
|
uses: RoboSats/robosats/.github/workflows/coordinator-image.yml@main
|
2024-01-22 10:34:19 +00:00
|
|
|
needs: [frontend-build, integration-tests, check-versions]
|
2022-09-20 17:39:49 +00:00
|
|
|
secrets: inherit
|
2022-09-29 12:49:01 +00:00
|
|
|
with:
|
|
|
|
semver: ${{ needs.check-versions.outputs.semver }}
|
2022-10-25 18:04:12 +00:00
|
|
|
|
2024-01-11 13:17:14 +00:00
|
|
|
selfhosted-client-image:
|
|
|
|
uses: RoboSats/robosats/.github/workflows/selfhosted-client-image.yml@main
|
2024-01-22 10:34:19 +00:00
|
|
|
needs: [frontend-build, check-versions]
|
2024-01-11 13:17:14 +00:00
|
|
|
secrets: inherit
|
|
|
|
with:
|
|
|
|
semver: ${{ needs.check-versions.outputs.semver }}
|
|
|
|
|
|
|
|
web-client-image:
|
|
|
|
uses: RoboSats/robosats/.github/workflows/web-client-image.yml@main
|
2024-01-22 10:34:19 +00:00
|
|
|
needs: [frontend-build, check-versions]
|
2022-09-20 17:39:49 +00:00
|
|
|
secrets: inherit
|
2022-09-29 12:49:01 +00:00
|
|
|
with:
|
|
|
|
semver: ${{ needs.check-versions.outputs.semver }}
|
2022-10-25 18:04:12 +00:00
|
|
|
|
2022-09-28 14:51:29 +00:00
|
|
|
android-build:
|
2023-05-09 13:07:16 +00:00
|
|
|
uses: RoboSats/robosats/.github/workflows/android-build.yml@main
|
2022-09-29 12:49:01 +00:00
|
|
|
needs: [frontend-build, check-versions]
|
2024-05-12 21:08:59 +00:00
|
|
|
secrets: inherit
|
2022-09-28 14:51:29 +00:00
|
|
|
with:
|
|
|
|
semver: ${{ needs.check-versions.outputs.semver }}
|
2024-11-05 15:24:36 +00:00
|
|
|
|
2024-07-22 08:27:54 +00:00
|
|
|
desktop-build:
|
|
|
|
uses: RoboSats/robosats/.github/workflows/desktop-build.yml@main
|
|
|
|
needs: [frontend-build, check-versions]
|
|
|
|
secrets: inherit
|
|
|
|
with:
|
|
|
|
semver: ${{ needs.check-versions.outputs.semver }}
|
2022-10-25 18:04:12 +00:00
|
|
|
|
2022-09-20 17:39:49 +00:00
|
|
|
release:
|
2024-07-22 08:27:54 +00:00
|
|
|
needs: [check-versions, integration-tests, coordinator-image, selfhosted-client-image, web-client-image, android-build, desktop-build]
|
2022-09-20 17:39:49 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-09-11 16:00:32 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-09-20 17:39:49 +00:00
|
|
|
- name: Release
|
|
|
|
id: create-release
|
2024-03-14 11:32:30 +00:00
|
|
|
uses: softprops/action-gh-release@v2
|
2023-05-26 13:02:57 +00:00
|
|
|
with:
|
|
|
|
body_path: release_notes.md
|
|
|
|
generate_release_notes: true
|
2022-09-20 17:39:49 +00:00
|
|
|
|
2023-04-10 17:02:30 +00:00
|
|
|
# Upload app-universal-release APK artifact asset
|
|
|
|
- name: 'Download universal APK Artifact'
|
2023-12-25 13:16:37 +00:00
|
|
|
uses: actions/download-artifact@v4
|
2022-09-28 14:51:29 +00:00
|
|
|
with:
|
2023-04-10 17:02:30 +00:00
|
|
|
name: robosats-${{ needs.check-versions.outputs.semver }}-universal.apk
|
2022-09-28 14:51:29 +00:00
|
|
|
path: .
|
2023-04-10 17:02:30 +00:00
|
|
|
- name: 'Upload universal APK Asset'
|
2023-04-10 17:38:42 +00:00
|
|
|
id: upload-universal-release-asset
|
2022-09-28 14:51:29 +00:00
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
2023-04-10 17:02:30 +00:00
|
|
|
asset_path: app-universal-release.apk
|
|
|
|
asset_name: robosats-${{ needs.check-versions.outputs.semver }}-universal.apk
|
|
|
|
asset_content_type: application/apk
|
|
|
|
|
|
|
|
# Upload app-arm64-v8a-release APK artifact asset
|
|
|
|
- name: 'Download arm64-v8a APK Artifact'
|
2023-12-25 13:16:37 +00:00
|
|
|
uses: actions/download-artifact@v4
|
2023-04-10 17:02:30 +00:00
|
|
|
with:
|
|
|
|
name: robosats-${{ needs.check-versions.outputs.semver }}-arm64-v8a.apk
|
|
|
|
path: .
|
|
|
|
- name: 'Upload arm64-v8a APK Asset'
|
2023-04-10 17:38:42 +00:00
|
|
|
id: upload-arm64-v8a-release-asset
|
2023-04-10 17:02:30 +00:00
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
|
|
|
asset_path: app-arm64-v8a-release.apk
|
|
|
|
asset_name: robosats-${{ needs.check-versions.outputs.semver }}-arm64-v8a.apk
|
|
|
|
asset_content_type: application/apk
|
|
|
|
|
|
|
|
# Upload app-armeabi-v7a-release APK artifact asset
|
|
|
|
- name: 'Download armeabi-v7a APK Artifact'
|
2023-12-25 13:16:37 +00:00
|
|
|
uses: actions/download-artifact@v4
|
2023-04-10 17:02:30 +00:00
|
|
|
with:
|
|
|
|
name: robosats-${{ needs.check-versions.outputs.semver }}-armeabi-v7a.apk
|
|
|
|
path: .
|
|
|
|
- name: 'Upload armeabi-v7a APK Asset'
|
2023-04-10 17:38:42 +00:00
|
|
|
id: upload-armeabi-v7a-release-asset
|
2023-04-10 17:02:30 +00:00
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
|
|
|
asset_path: app-armeabi-v7a-release.apk
|
|
|
|
asset_name: robosats-${{ needs.check-versions.outputs.semver }}-armeabi-v7a.apk
|
|
|
|
asset_content_type: application/apk
|
|
|
|
|
|
|
|
# Upload app-x86_64-release APK artifact asset
|
|
|
|
- name: 'Download x86_64 APK Artifact'
|
2023-12-25 13:16:37 +00:00
|
|
|
uses: actions/download-artifact@v4
|
2023-04-10 17:02:30 +00:00
|
|
|
with:
|
|
|
|
name: robosats-${{ needs.check-versions.outputs.semver }}-x86_64.apk
|
|
|
|
path: .
|
|
|
|
- name: 'Upload x86_64 APK Asset'
|
2023-04-10 17:38:42 +00:00
|
|
|
id: upload-x86_64-release-asset
|
2023-04-10 17:02:30 +00:00
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
|
|
|
asset_path: app-x86_64-release.apk
|
|
|
|
asset_name: robosats-${{ needs.check-versions.outputs.semver }}-x86_64.apk
|
|
|
|
asset_content_type: application/apk
|
|
|
|
|
2024-07-22 08:27:54 +00:00
|
|
|
- name: 'Download macOS Build Artifact'
|
|
|
|
uses: actions/download-artifact@v4
|
|
|
|
with:
|
2024-09-10 00:51:44 +00:00
|
|
|
name: robosats-desktop-${{ needs.check-versions.outputs.semver }}-mac-darwin-x64.zip
|
2024-07-22 08:27:54 +00:00
|
|
|
path: .
|
2024-11-05 15:24:36 +00:00
|
|
|
|
2024-07-22 08:27:54 +00:00
|
|
|
- name: 'Upload macOS Build Artifact'
|
|
|
|
id: upload-release-mac-zip-asset
|
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
2024-11-02 21:15:25 +00:00
|
|
|
asset_path: robosats-desktop-${{ needs.check-versions.outputs.semver }}-mac-darwin-x64.zip
|
2024-09-10 00:51:44 +00:00
|
|
|
asset_name: robosats-desktop-${{ needs.check-versions.outputs.semver }}-mac-darwin-x64.zip
|
2024-07-22 08:53:21 +00:00
|
|
|
asset_content_type: application/zip
|
|
|
|
|
|
|
|
- name: 'Download linux Build Artifact'
|
|
|
|
uses: actions/download-artifact@v4
|
|
|
|
with:
|
2024-09-10 00:51:44 +00:00
|
|
|
name: robosats-desktop-${{ needs.check-versions.outputs.semver }}-linux-x64.zip
|
2024-07-22 08:53:21 +00:00
|
|
|
path: .
|
2024-09-10 00:51:44 +00:00
|
|
|
|
2024-07-22 08:53:21 +00:00
|
|
|
- name: 'Upload linux Build Artifact'
|
|
|
|
id: upload-release-linux-zip-asset
|
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
2024-09-10 00:51:44 +00:00
|
|
|
asset_path: robosats-desktop-${{ needs.check-versions.outputs.semver }}-linux-x64.zip
|
|
|
|
asset_name: robosats-desktop-${{ needs.check-versions.outputs.semver }}-linux-x64.zip
|
2024-07-22 08:53:21 +00:00
|
|
|
asset_content_type: application/zip
|
|
|
|
|
2024-11-02 21:15:25 +00:00
|
|
|
- name: 'Download Windows Build Artifact'
|
2024-07-22 08:53:21 +00:00
|
|
|
uses: actions/download-artifact@v4
|
|
|
|
with:
|
2024-09-10 00:51:44 +00:00
|
|
|
name: robosats-desktop-${{ needs.check-versions.outputs.semver }}-win32-ia32.zip
|
2024-07-22 08:53:21 +00:00
|
|
|
path: .
|
2024-11-05 15:24:36 +00:00
|
|
|
|
2024-11-02 21:15:25 +00:00
|
|
|
- name: 'Upload Windows Build Artifact'
|
2024-07-22 08:53:21 +00:00
|
|
|
id: upload-release-win-zip-asset
|
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
2024-09-10 00:51:44 +00:00
|
|
|
asset_path: robosats-desktop-${{ needs.check-versions.outputs.semver }}-win32-ia32.zip
|
|
|
|
asset_name: robosats-desktop-${{ needs.check-versions.outputs.semver }}-win32-ia32.zip
|
2024-07-22 08:27:54 +00:00
|
|
|
asset_content_type: application/zip
|