diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..71ddbdd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,65 @@ +name: Publish to pub.dev + +on: + pull_request: + branches: [ master ] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: 'publish pusher-channels-flutter package' + id: publish + uses: k-paxian/dart-package-publisher@master + with: + format: true + skipTests: true + flutter: true + accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }} + refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }} + + - name: 'Prepare tag name' + if: ${{ steps.publish.outputs.success }} + id: prepare_tag + run: | + export TAG=v${{ steps.publish.outputs.localVersion }} + echo "TAG=$TAG" >> $GITHUB_ENV + + - name: 'Commit release tag' + id: release_tag + if: ${{ steps.prepare_tag.outcome == 'success' }} + uses: hole19/git-tag-action@master + env: + TAG: ${{ env.TAG }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + outputs: + released-version: ${{ env.TAG }} + + create-github-release: + runs-on: ubuntu-latest + needs: publish + if: ${{ needs.publish.outputs.released-version }} + steps: + - uses: actions/checkout@v2 + - name: Setup git + run: | + git config user.email "pusher-ci@pusher.com" + git config user.name "Pusher CI" + + - name: Prepare description + run: | + csplit -s CHANGELOG.md "/##/" {1} + cat xx01 > CHANGELOG.tmp + + - name: Create Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ needs.publish.outputs.released-version }} + release_name: ${{ needs.publish.outputs.released-version }} + body_path: CHANGELOG.tmp + draft: false + prerelease: false \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index df349c9..fd6b39a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.0.3-dev.6 + +* [TEST] New release workflow + ## 1.0.2 * [FIXED] Android release configuration on example app diff --git a/example/pubspec.lock b/example/pubspec.lock index 09de044..ea0bfdc 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -114,13 +114,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" meta: dependency: transitive description: @@ -183,7 +176,7 @@ packages: path: ".." relative: true source: path - version: "1.0.1" + version: "1.0.3-dev.1" shared_preferences: dependency: "direct main" description: @@ -272,7 +265,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" + version: "0.4.3" typed_data: dependency: transitive description: diff --git a/pubspec.lock b/pubspec.lock index 1a6d40f..773bf6e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -93,13 +93,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" meta: dependency: transitive description: @@ -160,7 +153,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" + version: "0.4.3" typed_data: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index d87384c..f37f009 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: pusher_channels_flutter description: Pusher Channels Flutter Plugin -version: 1.0.2 +version: 1.0.3-dev.6 homepage: https://github.com/pusher/pusher-channels-flutter repository: https://github.com/pusher/pusher-channels-flutter issue_tracker: https://github.com/pusher/pusher-channels-flutter/issues