diff --git a/.github/workflows/check_release.yml b/.github/workflows/check_release.yml deleted file mode 100644 index 19dc262..0000000 --- a/.github/workflows/check_release.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Check Release Tag - -on: - workflow_run: - workflows: ["Build and test"] - types: - - completed - -jobs: - check-release-tag: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - if: ${{ github.event.workflow_run.conclusion == 'success' }} - steps: - - uses: actions/checkout@v4 - - name: Check release tag - run: | - ./bash/push_release.sh - shell: bash diff --git a/CHANGELOG.md b/CHANGELOG.md index 36216f4..8fb6411 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ -## 0.4.8 +## 0.4.0 -- Test script for create release tag for autopublish +- Autopublish with new tags. ## 0.3.9 diff --git a/README.md b/README.md index 3057d32..3f01c1c 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Add the following to your `pubspec.yaml` file: ```yaml dependencies: - approval_tests: ^0.4.8 + approval_tests: ^0.4.0 ``` ## 📚 How to use diff --git a/bash/push_release.sh b/bash/push_release.sh deleted file mode 100755 index c3a3b09..0000000 --- a/bash/push_release.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -e - -PACKAGE_NAME="approval_tests" -VERSION="" - -# Retrieve the current version from the pubspec.yaml file -VERSION=$(grep 'version:' pubspec.yaml | awk '{print $2}' | tr -d "'\"") - -# Fetch the HTML content from pub.dev -HTML_CONTENT=$(curl -s "https://pub.dev/packages/$PACKAGE_NAME") - -# Attempt to extract the version using awk and sed -PUB_DEV_VERSION=$(echo "$HTML_CONTENT" | grep 'approval_tests' | sed -n 's/.*approval_tests \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' | head -1) - -echo "Local version: $VERSION" -echo "Pub.dev version: $PUB_DEV_VERSION" - -# Compare the local version with the version on pub.dev -if [ "$VERSION" = "$PUB_DEV_VERSION" ]; then - echo "Error: The version $VERSION has already been published to pub.dev." - exit 1 -else - echo "Version $VERSION is ready to be tagged and pushed." - - # Configure git user - git config --local user.email "e99xxx@gmail.com" - git config --local user.name "Yelaman" - - # Fetch tags from the remote to update local reference - git fetch --tags - - # Check if the tag already exists in the remote - if git rev-parse "v$VERSION" >/dev/null 2>&1; then - echo "Tag v$VERSION already exists. Skipping tag creation." - exit 0 - else - # Create a tag in Git with the new version - echo "Publishing..." - git tag -a "v$VERSION" -m "Release version $VERSION" - git push origin v$VERSION - fi -fi diff --git a/pubspec.yaml b/pubspec.yaml index 6164194..dc32c24 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ # * 0.0.4 for a minor release. name: approval_tests description: Approval Tests implementation in Dart. Inspired by ApprovalTests. -version: 0.4.8 +version: 0.4.0 repository: https://github.com/approvals/ApprovalTests.Dart homepage: https://github.com/approvals/ApprovalTests.Dart.git issue_tracker: https://github.com/approvals/ApprovalTests.Dart/issues