Skip to content

Commit

Permalink
Updating automated releases
Browse files Browse the repository at this point in the history
  • Loading branch information
topherbuckley committed Jun 4, 2024
1 parent 2be867a commit 6c4d45e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
17 changes: 14 additions & 3 deletions .github/scripts/generate_output_paths.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
#!/bin/sh
files=$(jq -r '.apps[] | "./apps/" + . + "/build/outputs/apk/debug/" + . + "-debug.apk ./apps/" + . + "/build/outputs/apk/release/" + . + "-release.apk"' apps-config.json)
echo "files=$files" >> $GITHUB_ENV
#!/bin/bash

# Read the JSON file
json=$(cat your_file.json)

# Extract the app names
apps=$(echo "$json" | jq -r '.apps | join(",")')

# Create the debug and release lines
debug_line="apps/{$apps}/build/outputs/apk/debug/{$apps}-debug.apk"
release_line="apps/{$apps}/build/outputs/apk/release/{$apps}-release-unsigned.apk"

# Print the lines
echo -e "$debug_line\n$release_line"
5 changes: 3 additions & 2 deletions .github/workflows/automated-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ jobs:
run: sudo apt-get install -y jq

- name: Generate file paths
run: ./.github/scripts/generate_output_paths.sh
id: generate_paths
run: echo "paths=./.github/scripts/generate_output_paths.sh" >> $GITHUB_ENV

- name: Release
uses: softprops/action-gh-release@v2
with:
files: ${{ env.files }}
files: ${{ steps.generate_paths.outputs.paths }}
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref_name }}
generate_release_notes: true

0 comments on commit 6c4d45e

Please sign in to comment.