Skip to content

Commit

Permalink
Download artifacts from GitHub Releases instead of Azure storage (#363)
Browse files Browse the repository at this point in the history
* download artifacts from GitHub Releases instead of Azure storage

* remove `upload_artifact` script

* patrol_cli: bump version to 0.6.6+1
  • Loading branch information
bartekpacia authored Sep 26, 2022
1 parent d4241f8 commit 9057846
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 44 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/patrol_cli-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
check_versions:
name: Check if version is consistently defined
runs-on: ubuntu-latest

steps:
Expand All @@ -17,6 +18,7 @@ jobs:
run: ./check_versions

upload_artifacts:
name: Build artifacts and create release
runs-on: ubuntu-latest
needs: check_versions

Expand Down Expand Up @@ -94,16 +96,8 @@ jobs:
AutomatorServer/android/${{ env.INSTRUMENTATION_FILE }}
AutomatorServer/${{ env.IOS_ZIP_DIRECTORY }}
- name: Upload artifacts to Azure Storage
env:
AZURE_STORAGE_URL: https://lncdmaestrostorage.blob.core.windows.net/artifacts
AZURE_SAS_TOKEN: ${{ secrets.AZURE_SAS_TOKEN }}
run: |
./upload_artifact AutomatorServer/android/${{ env.SERVER_FILE }}
./upload_artifact AutomatorServer/android/${{ env.INSTRUMENTATION_FILE }}
./upload_artifact AutomatorServer/${{ env.IOS_ZIP_DIRECTORY }}
publish_cli:
name: Publish on pub.dev
runs-on: ubuntu-latest
needs: upload_artifacts

Expand Down
5 changes: 5 additions & 0 deletions packages/patrol_cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.6.6+1

- Download artifacts from GitHub Releases insted of LeanCode's Azure Storage
(#363)

## 0.6.6

- Release updated `AutomatorServer`s (#338)
Expand Down
6 changes: 4 additions & 2 deletions packages/patrol_cli/lib/src/common/artifacts_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,11 @@ class _Paths {
///
/// [artifact] must be in the form of `$artifact-$version.$extension`, for
/// example: `server-1.0.0.apk` or `ios-4.2.0.zip`.
Uri getUriForArtifact(String artifact) {
Uri getUriForArtifact(
String artifact,
) {
return Uri.parse(
'https://lncdmaestrostorage.blob.core.windows.net/artifacts/$artifact',
'https://github.com/leancodepl/patrol/releases/download/patrol_cli-v$version/$artifact',
);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/patrol_cli/lib/src/common/constants.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:path/path.dart' as path;

/// Version of Patrol CLI. Must be kept in sync with pubspec.yaml.
const version = '0.6.6';
const version = '0.6.6+1';

const patrolPackage = 'patrol';
const patrolCliPackage = 'patrol_cli';
Expand Down
2 changes: 1 addition & 1 deletion packages/patrol_cli/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: patrol_cli
description: >
Command-line tool for Patrol, a powerful Flutter-native UI testing framework.
version: 0.6.6
version: 0.6.6+1
homepage: https://patrol.leancode.co
repository: https://github.com/leancodepl/patrol
issue_tracker: https://github.com/leancodepl/patrol/issues
Expand Down
31 changes: 0 additions & 31 deletions upload_artifact

This file was deleted.

0 comments on commit 9057846

Please sign in to comment.