Skip to content

Commit

Permalink
fixed validation publish condition
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewnitschke-wk committed Sep 6, 2024
1 parent e7d7c4a commit fd68ffd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,18 @@ jobs:
- id: analyze-pubspec
working-directory: ${{ inputs.package-path }}
run: |
echo "package_name=$(yq '.name' pubspec.yaml)" >> $GITHUB_OUTPUT
echo "package_version=$(yq '.version' pubspec.yaml)" >> $GITHUB_OUTPUT
PACKAGE_NAME=$(yq '.name' pubspec.yaml)
PACKAGE_VERSION=$(yq '.version' pubspec.yaml)
echo "release_ref=refs/head/release_$PACKAGE_NAME_$PACKAGE_VERSION" >> $GITHUB_ENV
- name: Debug
run: |
echo "Current Ref: ${{ github.ref}}"
echo "Analyzed Release Ref: ${{ steps.analyze-pubspec.outputs.release_ref }}"
- name: Validate Publish
# Only validate the publish for release pull requests, as determined by the branch name
if: github.ref == format('refs/head/release_{0}_{1}', steps.analyze-pubspec.outputs.package_name, steps.analyze-pubspec.outputs.package_version)
if: github.ref == steps.analyze-pubspec.outputs.release_ref
run: dart pub publish --dry-run

analyze-additional-checks:
Expand Down

0 comments on commit fd68ffd

Please sign in to comment.