Skip to content

Commit

Permalink
chore: add github workflow to publish and issue triage
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoradi88 committed Jun 19, 2024
1 parent dd834a5 commit 2da28c9
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 14 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "All the sdk specific jobs"

on:
workflow_call:

jobs:
pub-dev-dry-run:
runs-on: ubuntu-latest
steps:
# Checkout repository
- uses: actions/checkout@v4
# Setup Dart SDK with JWT token
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
flutter-version: ${{ env.flutter_version }}
channel: stable
cache: true
# Minimal package setup and dry run checks.
- name: Install dependencies
run: flutter pub get
- name: Dry run
run: flutter pub publish --dry-run
18 changes: 18 additions & 0 deletions .github/workflows/issue-triage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Add issues to Product Management Project.

on:
issues:
types:
- opened

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
# You can target a repository in a different organization
# to the issue
project-url: https://github.com/orgs/famedly/projects/4
github-token: ${{ secrets.ADD_ISSUE_TO_PROJECT_PAT }}
35 changes: 35 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches:
- main
tags:
- v[0-9]+.[0-9]+.[0-9]+
pull_request:
merge_group:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
dart:
permissions:
contents: read
uses: famedly/frontend-ci-templates/.github/workflows/dart.yml@main
with:
env_file: ".github/workflows/versions.env"
secrets:
ssh_key: "${{ secrets.CI_SSH_PRIVATE_KEY }}"

general:
permissions:
contents: read
uses: famedly/frontend-ci-templates/.github/workflows/general.yml@main

app_jobs:
secrets: inherit
uses: ./.github/workflows/app.yaml


44 changes: 44 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish to pub.dev

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+

# Publish using the reusable workflow from dart-lang
jobs:
publish:
name: Publish to pub.dev
environment: pub.dev
permissions:
contents: read
id-token: write # This is required for requesting the JWT
runs-on: ubuntu-latest
steps:
# Checkout repository
- uses: actions/checkout@v4
# Setup Dart SDK with JWT token
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
flutter-version: ${{ env.flutter_version }}
channel: stable
cache: true
# Minimal package setup and dry run checks
- name: Install dependencies
run: flutter pub get
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
- name: Dry run
run: dart pub publish --dry-run
# Publishing...
- name: Publish to pub.dev
run: dart pub publish -f

create_release:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
- name: Create release
run: |
gh release create ${{ github.ref_name }}
2 changes: 2 additions & 0 deletions .github/workflows/versions.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
flutter_version=3.16.9
dart_version=3.2.6
13 changes: 0 additions & 13 deletions .gitlab-ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: fcm_shared_isolate
description: Firebase Messaging Plugin for Flutter supporting shared isolate
homepage: https://famedly.com
version: 0.1.0
repository: https://gitlab.com/famedly/libraries/fcm_shared_isolate
repository: https://github.com/famedly/fcm_shared_isolate
issue_tracker: https://gitlab.com/famedly/libraries/fcm_shared_isolate/issues

environment:
Expand Down

0 comments on commit 2da28c9

Please sign in to comment.