diff options
author | Allan Wang <me@allanwang.ca> | 2021-09-12 01:20:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-12 01:20:00 -0700 |
commit | 59db300f97ad3bab7f64b6827f79b419ab714776 (patch) | |
tree | b95fad2ab1caea9f9c55e5638392b2218fa03e31 | |
parent | 4bc024533d968e7f7020a4d771f1c5e4c37d2294 (diff) | |
download | frost-59db300f97ad3bab7f64b6827f79b419ab714776.tar.gz frost-59db300f97ad3bab7f64b6827f79b419ab714776.tar.bz2 frost-59db300f97ad3bab7f64b6827f79b419ab714776.zip |
Fix github actions semicolon (#1799)
* Test semicolon
* Test
* Fix should release
* Fix should release
* Update conditions
-rw-r--r-- | .github/workflows/android.yml | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 1d2db150..6a8a9a1b 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -9,7 +9,7 @@ on: jobs: build: -# if: ${{ false }} + if: ${{ false }} runs-on: ubuntu-latest @@ -72,7 +72,7 @@ jobs: # Tests artifact upload build-test: - if: ${{ false }} +# if: ${{ false }} runs-on: ubuntu-latest @@ -93,7 +93,7 @@ jobs: runs-on: ubuntu-latest - needs: build + needs: build-test env: GITHUB_TOKEN: ${{ secrets.TEST_RELEASE_GITHUB_API_TOKEN }} @@ -116,16 +116,16 @@ jobs: - name: Should Release run: | PREV_ID=$(cat Frost.txt | grep -o -E '[0-9]'+) - SHOULD_RELEASE=$( if [[ ${{ env.RELEASE_ID_NUMBER }} -gt $PREV_ID ]]; then; echo true; else; echo false; fi; ) + SHOULD_RELEASE=$( if [[ ${{ env.RELEASE_ID_NUMBER }} -gt $PREV_ID ]]; then echo true; else echo false; fi ) echo "Prev $PREV_ID Now ${{ env.RELEASE_ID_NUMBER }} Should Release $SHOULD_RELEASE" echo "SHOULD_RELEASE=${SHOULD_RELEASE}" >> $GITHUB_ENV - name: Update File - if: ${{ env.SHOULD_RELEASE }} + if: ${{ env.SHOULD_RELEASE == 'true' }} run: echo "Frost v${{ env.RELEASE_ID_NUMBER }}" > Frost.txt - name: Create Commit - if: ${{ env.SHOULD_RELEASE }} + if: ${{ env.SHOULD_RELEASE == 'true' }} id: create_commit uses: EndBug/add-and-commit@v7 with: @@ -138,17 +138,19 @@ jobs: # After commit - name: Download APK + if: ${{ env.SHOULD_RELEASE == 'true' }} uses: actions/download-artifact@v2 with: name: Frost-releaseTest.apk - name: Rename APK + if: ${{ env.SHOULD_RELEASE == 'true' }} run: | mv Frost-releaseTest.apk Frost-releaseTest-v${{ env.RELEASE_ID_NUMBER }}.apk ls -l - name: Create Release - if: ${{ env.SHOULD_RELEASE && steps.create_commit.outputs.pushed }} + if: ${{ (env.SHOULD_RELEASE == 'true') && steps.create_commit.outputs.pushed }} uses: ncipollo/release-action@v1 with: token: ${{ env.GITHUB_TOKEN }} @@ -164,6 +166,7 @@ jobs: allowUpdates: false - name: Echo Result + if: ${{ env.SHOULD_RELEASE == 'true' }} run: echo "Created release at https://github.com/${{ env.OWNER }}/${{ env.REPO }}/releases/tag/v${{ env.RELEASE_ID_NUMBER }}" |