Skip to content

Commit

Permalink
Revert publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
walsha2 committed May 30, 2023
1 parent d6179ef commit 0c303c3
Showing 1 changed file with 35 additions and 5 deletions.
40 changes: 35 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,43 @@
# https://github.com/dart-lang/ecosystem/blob/main/.github/workflows/publish.yaml
# https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose
# A CI configuration to auto-publish pub packages.
# Instructions defined in pub.dev admin panel

name: Publish

on:
pull_request:
branches: [ main ]
types: [opened, synchronize, reopened, labeled, unlabeled]
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ]

jobs:
publish:
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
Publish:
permissions:
id-token: write
pull-requests: write

name: 'Publish package'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- uses: subosito/flutter-action@v2
with:
channel: 'stable'

- name: Install firehose
run: dart pub global activate firehose

- name: Validate packages
if: ${{ github.event_name == 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.number }}
PR_LABELS: "${{ join(github.event.pull_request.labels.*.name) }}"
run: dart pub global run firehose --validate

- name: Publish packages
if: startsWith(github.ref, 'refs/tags/v')
run: dart pub global run firehose --publish

0 comments on commit 0c303c3

Please sign in to comment.