From 59db300f97ad3bab7f64b6827f79b419ab714776 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 12 Sep 2021 01:20:00 -0700 Subject: Fix github actions semicolon (#1799) * Test semicolon * Test * Fix should release * Fix should release * Update conditions --- .github/workflows/android.yml | 17 ++++++++++------- 1 file 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 }}" -- cgit v1.2.3