1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-11-09 12:32:30 +01:00

Fix github actions semicolon (#1799)

* Test semicolon

* Test

* Fix should release

* Fix should release

* Update conditions
This commit is contained in:
Allan Wang 2021-09-12 01:20:00 -07:00 committed by GitHub
parent 4bc024533d
commit 59db300f97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 }}"