mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-30 21:59:36 +02:00
fix(ci): check-publish job should check .changes/pre.json
This commit is contained in:
1 file changed
+9
-3
@@ -19,8 +19,9 @@ permissions:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# covector publishes once no change files are left (the version update PR consumed them) and
|
# covector publishes once no pending change files are left (the version update PR consumed them)
|
||||||
# otherwise opens that PR, which does not need the tests below.
|
# and otherwise opens that PR, which does not need the tests below. In pre-release mode the
|
||||||
|
# change files stay in `.changes` and `pre.json` lists the ones already released.
|
||||||
check-publish:
|
check-publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
@@ -29,7 +30,12 @@ jobs:
|
|||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
- id: check
|
- id: check
|
||||||
run: |
|
run: |
|
||||||
if find .changes -maxdepth 1 -name '*.md' ! -iname 'readme.md' | grep -q .; then
|
released=$(if [ -f .changes/pre.json ]; then jq -r '.changes[]' .changes/pre.json; fi)
|
||||||
|
# grep exits 1 when every change file was released; any other failure fails the step
|
||||||
|
pending=$(find .changes -maxdepth 1 -name '*.md' ! -iname 'readme.md' \
|
||||||
|
| { grep -vxF -e "$released" || [ $? -eq 1 ]; })
|
||||||
|
if [ -n "$pending" ]; then
|
||||||
|
printf 'pending change files:\n%s\n' "$pending"
|
||||||
echo "publish=false" >> "$GITHUB_OUTPUT"
|
echo "publish=false" >> "$GITHUB_OUTPUT"
|
||||||
else
|
else
|
||||||
echo "publish=true" >> "$GITHUB_OUTPUT"
|
echo "publish=true" >> "$GITHUB_OUTPUT"
|
||||||
|
|||||||
Reference in new issue
Block a user