From f86d03258b1fbbb891d55bf482283e9dda4b4285 Mon Sep 17 00:00:00 2001 From: Swift Kim Date: Wed, 23 Feb 2022 23:35:31 +0900 Subject: [PATCH] Add the release job --- .github/workflows/build.yml | 39 +++++++++++++++++++++++++++--- .github/workflows/check-symbol.yml | 8 +++--- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e7f0459769fd5..793e4930b15a2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,8 +2,8 @@ name: Build on: push: - branches: - - "flutter-*-tizen" + # branches: + # - "flutter-*-tizen" pull_request: jobs: @@ -85,7 +85,7 @@ jobs: ninja -C src/out/$OUTPUT_NAME tizen # Build unittests. - if [[ "$OUTPUT_NAME" == "linux_release_arm" ]]; then + if [ "$OUTPUT_NAME" = "linux_release_arm" ]; then ninja -C src/out/$OUTPUT_NAME flutter_tizen_unittests fi @@ -263,3 +263,36 @@ jobs: run: | chmod +x flutter_tizen_unittests docker run --rm -t -v `pwd`:/root ${IMAGE_TAG} /root/flutter_tizen_unittests + + release: + needs: [windows-build, macos-build, test] + if: github.event_name == 'push' + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions/download-artifact@v2 + + - name: create archives + run: | + rm -r *-unittests + for name in tizen-*; do + 7z a $name.zip ./$name/* + done + + - name: set variables + run: | + echo "TAG_NAME=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_ENV + echo "VERSION=$(echo "${{ github.ref_name }}" | cut -d'-' -f2)" >> $GITHUB_ENV + + - uses: softprops/action-gh-release@v1 + with: + name: ${{ env.VERSION }} (${{ env.TAG_NAME }}) + tag_name: ${{ env.TAG_NAME }} + target_commitish: ${{ github.ref_name }} + files: tizen-*.zip + body: | + Flutter engine ${{ env.VERSION }} for Tizen + + https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.github/workflows/check-symbol.yml b/.github/workflows/check-symbol.yml index 1cbadaf866721..5bc4645926293 100644 --- a/.github/workflows/check-symbol.yml +++ b/.github/workflows/check-symbol.yml @@ -2,7 +2,8 @@ name: Check Symbols on: workflow_run: - workflows: ["Build"] + workflows: + - Build types: - completed @@ -10,6 +11,7 @@ jobs: check: if: ${{ github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-latest + steps: - uses: actions/checkout@v2 - uses: actions/checkout@v2 @@ -43,7 +45,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, sha: context.payload.workflow_run.head_sha, - context: "Check Symbols", + context: 'Check Symbols', state: 'success', description: 'All symbols are valid' }); @@ -57,7 +59,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, sha: context.payload.workflow_run.head_sha, - context: "Check Symbols", + context: 'Check Symbols', state: 'failure', description: 'Failed in checking symbols', target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}',