Skip to content

Commit

Permalink
3546 Rewrite publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
joecotton-wk committed Apr 3, 2024
1 parent d843c4a commit 2877646
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 31 deletions.
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@



---
7 changes: 6 additions & 1 deletion .github/workflows/dart_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
sdk: [ 2.19.6, stable ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
Expand All @@ -33,3 +33,8 @@ jobs:
run: make gen-fixtures --check
- name: Run tests
run: make test-with-serve-remotes
# TODO https://github.com/Workiva/json_schema/issues/184
# When ^^^ is addressed, remove the --skip-validation flag here
- name: Publish - dry run
run: dart pub publish --dry-run --skip-validation

16 changes: 15 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,25 @@ jobs:
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
# TODO https://github.com/Workiva/json_schema/issues/184
# Based on https://github.com/dart-lang/setup-dart/blob/main/.github/workflows/publish.yml
publish:
name: Publish to pub.dev
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- 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
1 change: 0 additions & 1 deletion .pubignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
test
tool
Makefile
Dockerfile
dart_test.yaml
26 changes: 0 additions & 26 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: JSON Schema implementation in Dart
homepage: https://github.com/workiva/json_schema

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.12.0 <4.0.0'

dependencies:
collection: ^1.15.0
Expand Down

0 comments on commit 2877646

Please sign in to comment.