Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
Chore: Publishing GitHub action flow
Browse files Browse the repository at this point in the history
* refactor: workflow -> main

* refactor: Label issues

* refactor: Pull-request label tracking

* refactor: Pull-request tracking

* feat: Publishing to pub.dev

* refactor: analysis
  • Loading branch information
internetova committed Apr 25, 2022
1 parent 53cafdb commit 3691655
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 172 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Main"

on:
pull_request:
branches:
- main
push:
branches:
- main
tags-ignore:
- '**'

jobs:
analysis:
uses: surfstudio/flutter-ci-workflows/.github/workflows/analysis.yml@main

testing:
needs: analysis
uses: surfstudio/flutter-ci-workflows/.github/workflows/testing.yml@main
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

build_android_example:
needs: analysis
uses: surfstudio/flutter-ci-workflows/.github/workflows/build_android_example.yml@main

build_ios_example:
needs: analysis
uses: surfstudio/flutter-ci-workflows/.github/workflows/build_ios_example.yml@main
12 changes: 3 additions & 9 deletions .github/workflows/new_issues_label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ on:
- opened
jobs:
label_issues:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Label issues
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
with:
add-labels: "new issues"
repo-token: ${{ secrets.SECRET_ISSUES }}
uses: surfstudio/flutter-ci-workflows/.github/workflows/new_issues_label.yml@main
secrets:
SECRET_ISSUES: ${{ secrets.SECRET_ISSUES }}
20 changes: 3 additions & 17 deletions .github/workflows/new_pull_request_label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@ on:
jobs:
label_pull_request:
if: ${{ github.event.label.name == 'WIP' }}
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Add label pull request
if: "!contains(github.event.pull_request.title, 'WIP') && !contains(github.event.pull_request.labels.*.name, 'WIP') && (github.event.pull_request.draft == false)"
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
with:
add-labels: "new pull request"
repo-token: ${{ secrets.SECRET_ISSUES }}

- name: Remove label pull request
if: "contains(github.event.pull_request.title, 'WIP') || contains(github.event.pull_request.labels.*.name, 'WIP') || (github.event.pull_request.draft == true)"
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
with:
remove-labels: "new pull request"
repo-token: ${{ secrets.SECRET_ISSUES }}
uses: surfstudio/flutter-ci-workflows/.github/workflows/new_pull_request_label.yml@main
secrets:
SECRET_ISSUES: ${{ secrets.SECRET_ISSUES }}
22 changes: 4 additions & 18 deletions .github/workflows/new_pull_request_main_actions.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This workflow is triggered when when a pull request opened, edited, reopened,
# This workflow is triggered when a pull request opened, edited, reopened,
# converted_to_draft and ready_for_review.
#
# There is no WIP in the title, there is no WIP label and the pull request is not a draft the
Expand All @@ -17,20 +17,6 @@ on:

jobs:
pull_request:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Add label pull request
if: "!contains(github.event.pull_request.title, 'WIP') && !contains(github.event.pull_request.labels.*.name, 'WIP') && (github.event.pull_request.draft == false)"
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
with:
add-labels: "new pull request"
repo-token: ${{ secrets.SECRET_ISSUES }}

- name: Remove label pull request
if: "contains(github.event.pull_request.title, 'WIP') || contains(github.event.pull_request.labels.*.name, 'WIP') || (github.event.pull_request.draft == true)"
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
with:
remove-labels: "new pull request"
repo-token: ${{ secrets.SECRET_ISSUES }}
uses: surfstudio/flutter-ci-workflows/.github/workflows/new_pull_request_label.yml@main
secrets:
SECRET_ISSUES: ${{ secrets.SECRET_ISSUES }}
26 changes: 26 additions & 0 deletions .github/workflows/publish_to_pub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Publishing"

on:
push:
tags:
- v*

jobs:
analysis:
uses: surfstudio/flutter-ci-workflows/.github/workflows/analysis.yml@main

testing:
needs: analysis
uses: surfstudio/flutter-ci-workflows/.github/workflows/testing.yml@main
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

package-publishing:
needs: [ analysis, testing ]
uses: surfstudio/flutter-ci-workflows/.github/workflows/publish_to_pub.yml@main
with:
PANA_TOTAL: '100'
secrets:
PUB_CREDENTIAL_JSON: ${{ secrets.PUB_CREDENTIAL_JSON }}
PUB_OAUTH_ACCESS_TOKEN: ${{ secrets.PUB_OAUTH_ACCESS_TOKEN }}
PUB_OAUTH_REFRESH_TOKEN: ${{ secrets.PUB_OAUTH_REFRESH_TOKEN }}
128 changes: 0 additions & 128 deletions .github/workflows/workflow.yaml

This file was deleted.

0 comments on commit 3691655

Please sign in to comment.