Skip to content

Update GHA publishing steps #163

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
26 changes: 23 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,27 @@ on:
- '[0-9]+.[0-9]+.[0-9]+-rc[0-9]+'

jobs:
create-sbom-release-asset:
name: Create SBOM Release Asset
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Publish SBOM to Release Assets
uses: anchore/sbom-action@v0
with:
path: ./
format: cyclonedx-json
publish:
permissions:
id-token: write # Required for authentication using OIDC
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
name: Publish to pub.dev

Choose a reason for hiding this comment

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

Is there any reason here that we aren't using the supplied action? We just need to enable the package to run automated publishes and it should be good to go?

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We just need to enable the package to run automated publishes and it should be good to go?

We've made the pub-side configuration updates as-described, but using the shared workflow from the linked documentation has resulted in the following in the past:

dart-lang/setup-dart/.github/workflows/publish.yml@v1 is not allowed to be used in Workiva/opentelemetry-dart. 
Reusable workflows in this workflow must be: 
within a repository that belongs to your Enterprise account or matching the following: 
dart-lang/setup-dart@*, peter-evans/create-pull-request@*, denoland/setup-deno@*, romeovs/lcov-reporter-action@*, dorny/test-reporter@refs/tags/v1.6.0, dorny/test-reporter@e9fa2f582c0ebbe2e263fd18fad744d52e0b0203, maxim-lobanov/setup-xcode@9a697e2b393340c3cacd97468baa318e4c883d98, pypa/gh-action-pypi-publish@*, subosito/flutter-action@*, coursier/setup-action@*, browser-actions/setup-chrome@*, mikepenz/action-junit-report@150e2f992e4fad1379da2056d1d1c279f520e058, invertase/github-action-dart-analyzer@1cda5922c6369263b1c7e2fbe281f69704f4d63e, golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299, mikefarah/yq-portable-yaml-processor@845d4ae38915c31cc76ab968393657cceaec60fc, Workiva/gha-integration-testing@26fa4acd141cb143661af9e...

as here: https://github.com/Workiva/opentelemetry-dart/actions/runs/6828348643

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- name: Install dependencies
run: dart pub get
- name: Publish - dry run
run: dart pub publish --dry-run --skip-validation
- name: Publish
run: dart pub publish -f
4 changes: 0 additions & 4 deletions Dockerfile

This file was deleted.