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 18, 2024
1 parent dd834a5 commit af9111c
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
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 }}
20 changes: 20 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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:
general:
permissions:
contents: read
uses: famedly/frontend-ci-templates/.github/workflows/general.yml@main
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@v3
# Setup Dart SDK with JWT token
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
flutter-version: '3.16.0'
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@v3
- name: Create release
run: |
gh release create ${{ github.ref_name }}

0 comments on commit af9111c

Please sign in to comment.