mirror of
https://github.com/flutter/packages.git
synced 2025-06-27 04:37:07 +08:00
[ci] Enable auto publish (#400)
This commit is contained in:
9
.github/workflows/pull_request_label.yml
vendored
9
.github/workflows/pull_request_label.yml
vendored
@ -20,12 +20,3 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
sync-labels: true
|
sync-labels: true
|
||||||
|
|
||||||
post_merge_label:
|
|
||||||
if: github.event.action == 'closed' && github.event.pull_request.merged == true
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/labeler@9794b1493b6f1fa7b006c5f8635a19c76c98be95
|
|
||||||
with:
|
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
configuration-path: .github/post_merge_labeler.yml
|
|
||||||
|
48
.github/workflows/release.yml
vendored
Normal file
48
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
name: release
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
if: github.repository_owner == 'flutter'
|
||||||
|
name: release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Install Flutter"
|
||||||
|
# Github Actions don't support templates so it is hard to share this snippet with another action
|
||||||
|
# If we eventually need to use this in more workflow, we could create a shell script that contains this
|
||||||
|
# snippet.
|
||||||
|
run: |
|
||||||
|
cd $HOME
|
||||||
|
git clone https://github.com/flutter/flutter.git --depth 1 -b stable _flutter
|
||||||
|
echo "$HOME/_flutter/bin" >> $GITHUB_PATH
|
||||||
|
cd $GITHUB_WORKSPACE
|
||||||
|
# Checks out a copy of the repo.
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # Fetch all history so the tool can get all the tags to determine version.
|
||||||
|
- name: Set up tools
|
||||||
|
run: pub global activate flutter_plugin_tools 0.3.0
|
||||||
|
|
||||||
|
# # This workflow should be the last to run. So wait for all the other tests to succeed.
|
||||||
|
- name: Wait on all tests
|
||||||
|
uses: lewagon/wait-on-check-action@1b1630e169116b58a4b933d5ad7effc46d3d312d
|
||||||
|
with:
|
||||||
|
ref: ${{ github.sha }}
|
||||||
|
running-workflow-name: 'release'
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
wait-interval: 180 # seconds
|
||||||
|
allowed-conclusions: success
|
||||||
|
|
||||||
|
- name: run release
|
||||||
|
run: |
|
||||||
|
git config --global user.name ${{ secrets.USER_NAME }}
|
||||||
|
git config --global user.email ${{ secrets.USER_EMAIL }}
|
||||||
|
pub global run flutter_plugin_tools publish-plugin --all-changed --base-sha=HEAD~ --skip-confirmation --remote=origin
|
||||||
|
env: {PUB_CREDENTIALS: "${{ secrets.PUB_CREDENTIALS }}"}
|
||||||
|
|
||||||
|
env:
|
||||||
|
DEFAULT_BRANCH: master
|
@ -1,6 +1,7 @@
|
|||||||
# Flutter Packages
|
# Flutter Packages
|
||||||
|
|
||||||
[](https://cirrus-ci.com/github/flutter/packages/master)
|
[](https://cirrus-ci.com/github/flutter/packages/master)
|
||||||
|
[](https://github.com/flutter/packages/actions/workflows/release.yml)
|
||||||
|
|
||||||
This repo is a companion repo to the main [flutter repo](
|
This repo is a companion repo to the main [flutter repo](
|
||||||
https://github.com/flutter/flutter). It contains the source code for Flutter's
|
https://github.com/flutter/flutter). It contains the source code for Flutter's
|
||||||
|
Reference in New Issue
Block a user