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 environment input to support github deployment environments #131

Merged
merged 5 commits into from
Jul 10, 2023

Conversation

jakemac53
Copy link
Contributor

Closes #130

Separates publish/validate into two different jobs. The publish job will use the supplied environment, which may require approvals to run the jobs if configured. See https://dart.dev/tools/pub/automated-publishing#hardening-security-with-github-deployment-environments.

@jakemac53 jakemac53 requested a review from devoncarew July 6, 2023 17:53
@github-actions github-actions bot added the type-infra A repository infrastructure change or enhancement label Jul 6, 2023
@github-actions
Copy link

github-actions bot commented Jul 6, 2023

PR Health

Package publish validation ✔️

Details
Package Version Status
package:firehose 0.3.22-wip version 0.3.22-wip is pre-release; no publish necessary
package:dart_flutter_team_lints 1.0.0 already published at pub.dev

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

License Headers ✔️

Details
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Changelog Entry ✔️

Details
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

Coverage ✔️

Details
File Coverage

This check for test coverage is informational (issues shown here will not fail the PR).

jakemac53 added a commit to dart-lang/build that referenced this pull request Jul 6, 2023
Copy link
Member

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Before landing, please update the changelog + pubspec (to either 0.3.22-wip or 0.3.22); thanks!

.github/workflows/publish.yaml Show resolved Hide resolved
if: ${{ github.event_name == 'push' }}

# Require the github deployment environment if supplied.
environment: ${{ inputs.environment }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is a no-op if inputs.environment is empty / not specified?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do assume so although I haven't found documentation on it. This is how the core dart-setup publish action works though.

.github/workflows/publish.yaml Outdated Show resolved Hide resolved
@jakemac53 jakemac53 merged commit 5a9f06b into main Jul 10, 2023
17 checks passed
@jakemac53 jakemac53 deleted the deployment-environments branch July 10, 2023 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:firehose type-infra A repository infrastructure change or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support github deployment environments
2 participants