Skip to content

Commit

Permalink
ci(release): resolve issues with pub dev publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
smallTrogdor committed Dec 13, 2024
1 parent f2fdac6 commit d3b4458
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,9 @@ jobs:
tag: ${{ steps.read-changelog.outputs.version }}
message: "Version Release ${{ steps.read-changelog.outputs.version }} on ${{ steps.read-changelog.outputs.date }}"

create-github-release:
runs-on: ubuntu-latest
needs: create-tag
steps:
- name: Clone Repository
uses: actions/checkout@v4
with:
ref: refs/tags/${{ needs.create-tag.outputs.tag_name }}

- name: Create GitHub Releases based on changelog
uses: taiki-e/[email protected]
with:
ref: refs/tags/${{ needs.create-tag.outputs.tag_name }}
token: ${{ steps.app-token.outputs.token }}
ref: refs/tags/${{ steps.read-changelog.outputs.version }}
changelog: ./CHANGELOG.md
15 changes: 13 additions & 2 deletions .github/workflows/pubdev-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,19 @@ on:
tags:
- "[0-9]+.[0-9]+.[0-9]+" # tag pattern on pub.dev: '{{version}}'

# Publish using custom workflow
jobs:
publish:
permissions:
id-token: write
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
id-token: write # Required for authentication using OIDC
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter doctor -v
- run: flutter pub get
- run: flutter pub publish --force
5 changes: 2 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: The official SBB design system mobile for Flutter.
homepage: https://digital.sbb.ch/de/design-system/mobile/overview/
repository: https://github.com/SchweizerischeBundesbahnen/design_system_flutter
issue_tracker: https://github.com/SchweizerischeBundesbahnen/design_system_flutter/issues
topics: [ icons, theme, design, design-system ]
topics: [icons, theme, design, design-system]

# set by Github Action
version: 2.1.0
Expand All @@ -17,7 +17,7 @@ dependencies:
sdk: flutter

# https://pub.dev/packages/intl
intl: ">=0.18.0"
intl: ">=0.18.0 <=0.21.0"
# https://pub.dev/packages/collection
collection: ^1.18.0

Expand All @@ -33,7 +33,6 @@ platforms:
android:
ios:


flutter:
assets:
- lib/fonts/
Expand Down

0 comments on commit d3b4458

Please sign in to comment.