Skip to content

ci: remove the release notes file creation #269

ci: remove the release notes file creation

ci: remove the release notes file creation #269

Workflow file for this run

name: πŸš€ Publish to pub.dev
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
jobs:
publish:
name: Publish the packages
permissions:
id-token: write
# Required for uploading files to the release assets of GitHub.
contents: write
runs-on: ubuntu-latest
steps:
- name: πŸ“¦ Checkout repository
uses: actions/checkout@v4
- name: πŸ“„ Upload LICENSE file to release assets
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: LICENSE
- name: πŸ› οΈ Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: πŸ” Verify Flutter installation
run: flutter --version
- name: πŸ“₯ Install Flutter dependencies
run: flutter pub get
# This is needed in order for the authentication to success
# dart pub token add https://pub.dev --env-var PUB_TOKEN
# Requests to "https://pub.dev" will now be authenticated using the secret token stored in the environment variable "PUB_TOKEN".
- name: πŸ—οΈ Set up Dart environment
uses: dart-lang/setup-dart@v1
## dart-lang/setup-dart/.github/workflows/publish.yml@v1
# - name: Update the authorization requests to "https://pub.dev" to use the environment variable "PUB_TOKEN".
# run: dart pub token add https://pub.dev --env-var PUB_TOKEN
# Extract version from the tag (handles the 'v' prefix)
- name: 🏷️ Extract version from tag as pubspec.yaml version
id: extract_version
run: |
version=$(echo ${GITHUB_REF} | sed 's/^refs\/tags\/v\(.*\)$/\1/')
echo "VERSION=${version}" >> $GITHUB_OUTPUT
- name: βœ… Validate extracted version format (should be pubspec.yaml valid version)
run: |
version=${{ steps.extract_version.outputs.VERSION }}
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then
echo "❌ Invalid version format: $version. The version must be a valid pubspec.yaml version"
exit 1
fi
# TODO: Validate the tag, the version must match the one in pubspec.yaml
# TODO: Might automate some changes of the CHANGELOG.md
- name: πŸ”„ Check if package is ready for publishing
run: flutter pub publish --dry-run
- name: πŸ“€ Publish flutter_quill
run: flutter pub publish --force