Skip to content

Commit cb90c15

Browse files
committed
Enable tag-based publishing in CI workflow
Removes conditional checks and ensures publishing steps run only for tag refs starting with 'v'. Simplifies the publish_pkg function to always publish and adjusts sleep intervals between package publishes.
1 parent 2580b35 commit cb90c15

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ jobs:
226226
# - windows
227227
# - linux
228228
runs-on: ubuntu-22.04
229-
# if: startsWith(github.ref, 'refs/tags/v')
229+
if: startsWith(github.ref, 'refs/tags/v')
230230
steps:
231231

232232
- name: Checkout repository
@@ -270,15 +270,13 @@ jobs:
270270
echo "PKG_VER=$PKG_VER" | tee -a "$GITHUB_ENV"
271271
272272
- name: Configure pub.dev credentials
273-
if: startsWith(github.ref, 'refs/tags/v')
274273
env:
275274
PUB_DEV_TOKEN: ${{ secrets.PUB_DEV_TOKEN }}
276275
run: |
277276
mkdir -p $HOME/.config/dart
278277
echo "$PUB_DEV_TOKEN" | base64 --decode > $HOME/.config/dart/pub-credentials.json
279278
280279
- name: Patch pubspec versions
281-
if: startsWith(github.ref, 'refs/tags/v')
282280
shell: bash
283281
working-directory: "src"
284282
run: |
@@ -298,19 +296,15 @@ jobs:
298296
run: |
299297
publish_pkg () {
300298
pushd "$1" >/dev/null
301-
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
302-
dart pub publish --force
303-
sleep $2
304-
else
305-
dart pub get
306-
dart analyze
307-
fi
299+
dart pub publish --force
308300
popd >/dev/null
309301
}
310302
311-
publish_pkg src/serious_python_platform_interface 600
312-
publish_pkg src/serious_python_android 0
313-
publish_pkg src/serious_python_darwin 0
314-
publish_pkg src/serious_python_windows 0
315-
publish_pkg src/serious_python_linux 600
316-
publish_pkg src/serious_python 0
303+
publish_pkg src/serious_python_platform_interface
304+
sleep 600
305+
publish_pkg src/serious_python_android
306+
publish_pkg src/serious_python_darwin
307+
publish_pkg src/serious_python_windows
308+
publish_pkg src/serious_python_linux
309+
sleep 600
310+
publish_pkg src/serious_python

0 commit comments

Comments
 (0)