From bf7a44009758d5388fc42d161db45fd85c322566 Mon Sep 17 00:00:00 2001 From: Franz Schwartau Date: Sun, 25 Aug 2024 14:49:35 +0200 Subject: [PATCH 1/2] Remove needless comments --- .github/workflows/download-and-release-apk.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/download-and-release-apk.yaml b/.github/workflows/download-and-release-apk.yaml index 17c132f..39e6880 100644 --- a/.github/workflows/download-and-release-apk.yaml +++ b/.github/workflows/download-and-release-apk.yaml @@ -1,21 +1,17 @@ name: Download+Release Juggluco -# Controls when the workflow will run on: schedule: # * is a special character in YAML so you have to quote this string - - cron: '23 1 * * *' # Google causes problems sometimes when downloads are too frequent + - cron: '23 1 * * *' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: retrieve_apk: - # The type of runner that the job will run on runs-on: ubuntu-latest - # Steps represent a sequence of tasks that will be executed as part of the job steps: - name: Checkout uses: actions/checkout@v4 @@ -35,12 +31,10 @@ jobs: echo "new_hash=$(cat hash_new_file)" >> $GITHUB_OUTPUT release_apk: - # The type of runner that the job will run on runs-on: ubuntu-latest needs: retrieve_apk if: ${{ needs.build.outputs.current_hash != needs.build.outputs.new_hash }} - # Steps represent a sequence of tasks that will be executed as part of the job steps: - name: Update current hash run: | From e2d0f95340e082aa742b19a7025879a981016c8d Mon Sep 17 00:00:00 2001 From: Franz Schwartau Date: Sun, 25 Aug 2024 14:50:09 +0200 Subject: [PATCH 2/2] Make names a bit clearer --- .github/workflows/download-and-release-apk.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/download-and-release-apk.yaml b/.github/workflows/download-and-release-apk.yaml index 39e6880..0fe3662 100644 --- a/.github/workflows/download-and-release-apk.yaml +++ b/.github/workflows/download-and-release-apk.yaml @@ -9,7 +9,7 @@ on: workflow_dispatch: jobs: - retrieve_apk: + download_apk: runs-on: ubuntu-latest steps: @@ -24,7 +24,7 @@ jobs: filename=$(ls -1 *.apk) echo "filename=${filename}" >> $GITHUB_ENV - - name: Store SHA256 hash of new apk + - name: Store SHA256 hash of apk run: | sha256sum "${{ env.filename }}" | cut -d " " -f 1 > hash_new_file echo "current_hash=$(cat hash_current_file)" >> $GITHUB_OUTPUT @@ -32,7 +32,7 @@ jobs: release_apk: runs-on: ubuntu-latest - needs: retrieve_apk + needs: download_apk if: ${{ needs.build.outputs.current_hash != needs.build.outputs.new_hash }} steps: @@ -60,7 +60,7 @@ jobs: curl --location --remote-name --output "${changelog}" "${url}" echo "changelog=${changelog}" >> $GITHUB_ENV - - name: Get changes + - name: Get changes from changelog run: | python_dir="parse_changelog" changes_file="changes.md" @@ -69,13 +69,13 @@ jobs: python "${python_dir}/parse_changelog.py" "${{ env.changelog }}" "${{ env.version }}" > "${changes_file}" echo "changes_file=${changes_file}" >> $GITHUB_ENV - - name: Commit and push the change + - name: Commit and push changes uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Update for version ${{ env.version }}" file_pattern: "hash_current_file" - - name: Release apk if hashes are different + - name: Release apk uses: softprops/action-gh-release@v2 with: tag_name: ${{ env.tagname }}