Skip to content

Commit

Permalink
Publish internal.yaml (#42)
Browse files Browse the repository at this point in the history
* contribute a publish_internal.yaml file

* update readmes

* fix script
  • Loading branch information
devoncarew authored Jan 25, 2023
1 parent 515ab32 commit 6344210
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/publish_internal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# A CI configuration to auto-publish pub packages from dart-lang/ecosystem.

# We don't use the regular publish.yaml script here in order to dogfood the
# publishing code at head.

name: Publish

on:
pull_request:
branches: [ main ]
push:
tags: [ '[A-z]+-v[0-9]+.[0-9]+.[0-9]+*' ]

jobs:
publish:
if: github.repository_owner == 'dart-lang'

# These permissions are required for authentication using OIDC and to enable
# us to create comments on PRs.
permissions:
id-token: write
pull-requests: write

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46

- name: Pub get
working-directory: pkgs/firehose
run: dart pub get

- name: Validate packages
if: ${{ github.event_name == 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.number }}
run: dart pkgs/firehose/bin/firehose.dart --validate

- name: Publish tagged package
if: ${{ github.event_name == 'push' }}
run: dart pkgs/firehose/bin/firehose.dart --publish
1 change: 1 addition & 0 deletions pkgs/dart_flutter_team_lints/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![pub package](https://img.shields.io/pub/v/dart_flutter_team_lints.svg)](https://pub.dev/packages/dart_flutter_team_lints)
[![package publisher](https://img.shields.io/pub/publisher/dart_flutter_team_lints.svg)](https://pub.dev/packages/dart_flutter_team_lints/publisher)

## What is this?

Expand Down
4 changes: 4 additions & 0 deletions pkgs/firehose/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.8

- Updated the pubspec `repository` field to reflect the new source location.

## 0.3.7+1

- Fix an issue in the `.github/workflows/publish.yaml` workflow file.
Expand Down
6 changes: 6 additions & 0 deletions pkgs/firehose/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![pub package](https://img.shields.io/pub/v/firehose.svg)](https://pub.dev/packages/firehose)
[![package publisher](https://img.shields.io/pub/publisher/firehose.svg)](https://pub.dev/packages/firehose/publisher)

## What's this?

Expand Down Expand Up @@ -75,3 +76,8 @@ jobs:
publish:
uses: dart-lang/ecosystem/.github/workflows/publish.yml@main
```
## Workflow docs
The description of the common workflow for repos using this tool can be found at
https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.
2 changes: 1 addition & 1 deletion pkgs/firehose/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: firehose
description: A tool to automate publishing of Pub packages from GitHub actions.
version: 0.3.7+1
version: 0.3.8
repository: https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose

environment:
Expand Down

0 comments on commit 6344210

Please sign in to comment.