Skip to content

Commit

Permalink
Merge 9348ccc into fb7ee19
Browse files Browse the repository at this point in the history
  • Loading branch information
fbenevides authored Feb 18, 2022
2 parents fb7ee19 + 9348ccc commit a14fa5a
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 18 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 "[email protected]"
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.0.3-dev.6

* [TEST] New release workflow

## 1.0.2

* [FIXED] Android release configuration on example app
Expand Down
11 changes: 2 additions & 9 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
9 changes: 1 addition & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit a14fa5a

Please sign in to comment.