update url #43
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to pub.dev | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+*' | |
jobs: | |
publish: | |
name: 'Publish to pub.dev' | |
environment: ${{ inputs.environment }} | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: write # This is required for creating a release on GitHub | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout repository | |
- uses: actions/checkout@v4 | |
# Set up Dart | |
- name: Set up Dart | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: stable | |
# Set up Flutter | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
channel: ${{ matrix.flutter-channel }} | |
# Minimal package setup and dry run checks. | |
- name: Install dependencies | |
run: dart pub get | |
working-directory: ${{ inputs.working-directory }} | |
- name: Publish - dry run | |
run: dart pub publish --dry-run | |
working-directory: ${{ inputs.working-directory }} | |
# Publishing... | |
- name: Publish to pub.dev | |
run: dart pub publish -f | |
working-directory: ${{ inputs.working-directory }} | |
- name: Create release on GitHub | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ github.ref_name }} | |
body: '[See changelog on pub.dev](${{ env.CHANGELOG_URL }})' | |