Skip to content

Commit 7f66da6

Browse files
committed
Add workflows
1 parent ef27a7d commit 7f66da6

File tree

2 files changed

+60
-4
lines changed

2 files changed

+60
-4
lines changed

.github/labeler.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,3 @@
6363
# Tools
6464
'tools':
6565
- tools/**/*
66-
67-
# Publishing
68-
'needs-publishing':
69-
- packages/**/pubspec.yaml

.github/workflows/release.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: release
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: release
11+
runs-on: ubuntu-latest
12+
if: ${{ github.repository_owner == 'flutter-tizen' }}
13+
steps:
14+
# Run flutter-tizen to fetch dart command in flutter repo.
15+
- name: Install flutter-tizen
16+
run: |
17+
cd $HOME
18+
git clone https://github.com/flutter-tizen/flutter-tizen.git --depth 1 -b master _flutter-tizen
19+
$HOME/_flutter-tizen/bin/flutter-tizen
20+
echo "$HOME/_flutter-tizen/flutter/bin" >> $GITHUB_PATH
21+
cd $GITHUB_WORKSPACE
22+
- name: Check out code
23+
uses: actions/checkout@v2
24+
with:
25+
fetch-depth: 2
26+
- name: Set up tools
27+
run: dart pub get
28+
working-directory: ${{ github.workspace }}/tools
29+
30+
- name: Wait on all tests
31+
uses: lewagon/[email protected]
32+
with:
33+
ref: ${{ github.sha }}
34+
running-workflow-name: 'release'
35+
repo-token: ${{ secrets.GITHUB_TOKEN }}
36+
wait-interval: 180 # seconds
37+
allowed-conclusions: success,neutral
38+
verbose: true
39+
40+
- name: Dry run on pull request
41+
if: ${{ github.event_name == 'pull_request' }}
42+
run: |
43+
./tools/tools_runner.sh publish-plugin \
44+
--all-changed \
45+
--pub-publish-flags=--dry-run \
46+
--base-sha=$(git rev-parse HEAD~)
47+
env: {PUB_CREDENTIALS: "${{ secrets.PUB_CREDENTIALS }}"}
48+
- name: Publish plugins
49+
if: ${{ github.event_name == 'push' }}
50+
run: |
51+
./tools/tools_runner.sh publish-plugin \
52+
--all-changed \
53+
--pub-publish-flags=--dry-run \
54+
--base-sha=HEAD~ \
55+
./tools/tools_runner.sh publish-plugin \
56+
--all-changed \
57+
--base-sha=HEAD~ \
58+
--skip-confirmation
59+
env: {PUB_CREDENTIALS: "${{ secrets.PUB_CREDENTIALS }}"}
60+

0 commit comments

Comments
 (0)