diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b15e23fe1..2c9e4f13a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,19 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Check if PR publish + if: ${{ github.event_name == 'pull_request' }} + id: pr_publish_check + run: | + git fetch origin main + commits=$(git show --no-patch --format=%B origin/main...${{ github.sha }}) + echo "$commits" + if [[ $commits =~ \[publish\] ]]; then + echo "publish=true" >> $GITHUB_OUTPUT + else + echo "publish=false" >> $GITHUB_OUTPUT + fi + - name: Set up Elixir uses: erlef/setup-beam@v1 with: