Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
as it depends on flutter the normal dart flow doesnt work
  • Loading branch information
HannesGitH authored Feb 10, 2024
1 parent 044f5cb commit 2f23be3
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,36 @@ jobs:
publish:
permissions:
id-token: write # Required for authentication using OIDC
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
runs-on: ubuntu-latest
steps:

- name: Clone repository
uses: actions/checkout@v3

# This action adds a token needed for pub.dev
- name: Install Dart
uses: dart-lang/setup-dart@v1
with:
sdk: stable

- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: ${{ matrix.channel }}
flutter-version: ${{ matrix.version }}

- name: Set version data
run: |
tag=${{ github.ref_name }}
echo "RELEASE_NOTES=$(link_changelog $tag)" >> $GITHUB_ENV
echo "IS_PRERELEASE=$(is_prerelease $tag)" >> $GITHUB_ENV
- name: Publish to pub.dev
run: flutter pub publish --force

- name: Create release
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
body: '[See changelog on pub.dev](${{ env.RELEASE_NOTES }})'
prerelease: ${{ env.IS_PRERELEASE }}

0 comments on commit 2f23be3

Please sign in to comment.