Skip to content

Commit

Permalink
Add the release job
Browse files Browse the repository at this point in the history
  • Loading branch information
swift-kim committed Feb 24, 2022
1 parent fe5b59a commit f86d032
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 6 deletions.
39 changes: 36 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Build

on:
push:
branches:
- "flutter-*-tizen"
# branches:
# - "flutter-*-tizen"
pull_request:

jobs:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
8 changes: 5 additions & 3 deletions .github/workflows/check-symbol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ name: Check Symbols

on:
workflow_run:
workflows: ["Build"]
workflows:
- Build
types:
- completed

jobs:
check:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
Expand Down Expand Up @@ -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'
});
Expand All @@ -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 }}',
Expand Down

0 comments on commit f86d032

Please sign in to comment.