ra1u / redis-dart

fast redis protocol parser and client
MIT License
84 stars 35 forks source link

Added workflow to publish new version #81

Closed necessarylion closed 1 year ago

necessarylion commented 1 year ago

Objective

Added a workflow to publish new version from Github release.

Description

When new release/tag from Github is created, this workflow will trigger to publish new package via the command dart pub publish --force.

NOTE: The package admin will need to config in package setting as shown in below picture.

Screenshot 2023-08-06 at 10 21 52 AM

ra1u commented 1 year ago

I noticed that under my Admin config there is example .github/workflows/publish.yml

name: Publish to pub.dev

on:
  push:
    tags:
      - 'v[0-9]+.[0-9]+.[0-9]+*'

jobs:
  publish:
    uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
    # with:
    #   working-directory: path/to/package/within/repository

But provided script in PR seems to publish any build.

Can you please fix script accordingly, so that only tagged builds gets published.

necessarylion commented 1 year ago

It will not publish on any build. since we added below config.

push:
 tags:
   - 'v[0-9]+.[0-9]+.[0-9]+*'

It will only publish when a tag is created.

And the one they mention in your admin config is kinda the same, it is using reusable workflow from dart-lang/setup-dart repo.

ra1u commented 1 year ago

Thank you.