Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github workflow to publish and issue triage #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
31 changes: 31 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
push:
branches:
- main
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"

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

rmoradi88 marked this conversation as resolved.
Show resolved Hide resolved
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
td-famedly marked this conversation as resolved.
Show resolved Hide resolved
# 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