Skip to content

Commit

Permalink
add dispose_scope-publish.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Aug 30, 2022
1 parent f849810 commit 93f4898
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/dispose_scope-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: dispose_scope publish

on:
push:
tags: ["dispose_scope-v*"]

jobs:
main:
runs-on: ubuntu-latest

defaults:
run:
working-directory: packages/dispose_scope

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Install Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 2.17.0

- name: Install mobile-tools
uses: actions/checkout@v3
with:
repository: leancodepl/mobile-tools
path: mobile-tools

- name: Add mobile-tools to PATH
run: |
echo $GITHUB_WORKSPACE/mobile-tools/bin >> $GITHUB_PATH
- name: Download pub.dev credentials
env:
CREDENTIALS: ${{ secrets.PUB_DEV_CREDENTIALS }}
run: |
mkdir -p ~/.pub-cache
echo $CREDENTIALS > ~/.pub-cache/credentials.json
- name: Set version data
run: |
package_name=dispose_scope
tag=${{ github.ref_name }}
echo "RELEASE_NOTES=$(link-changelog $package_name $tag)" >> $GITHUB_ENV
echo "IS_PRERELEASE=$(is_prerelease $package_name $tag)" >> $GITHUB_ENV
- name: Publish
run: dart pub publish -f

- name: Create release
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
body: ${{ env.RELEASE_NOTES }}
prerelease: ${{ env.IS_PRERELEASE }}

0 comments on commit 93f4898

Please sign in to comment.