Skip to content

Commit 2c23fd9

Browse files
committed
Add workflows
1 parent ef27a7d commit 2c23fd9

File tree

2 files changed

+57
-4
lines changed

2 files changed

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

0 commit comments

Comments
 (0)