|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: Publish Dart |
| 19 | +run-name: "Dart Release: ${{ github.ref_name }}" |
| 20 | + |
| 21 | +on: |
| 22 | + push: |
| 23 | + tags: ['v*'] |
| 24 | + |
| 25 | +permissions: |
| 26 | + contents: read |
| 27 | + id-token: write |
| 28 | + |
| 29 | +jobs: |
| 30 | + publish-dart: |
| 31 | + runs-on: ubuntu-latest |
| 32 | + if: github.repository == 'apache/fory' |
| 33 | + permissions: |
| 34 | + id-token: write |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@v5 |
| 37 | + |
| 38 | + - uses: actions/setup-python@v5 |
| 39 | + with: |
| 40 | + python-version: '3.11' |
| 41 | + |
| 42 | + - name: Bump dart version |
| 43 | + shell: bash |
| 44 | + run: | |
| 45 | + set -euo pipefail |
| 46 | + VERSION="${{ github.ref_name }}" |
| 47 | + VERSION="${VERSION#v}" |
| 48 | + python ci/release.py bump_version -l dart -version "$VERSION" |
| 49 | +
|
| 50 | + - uses: dart-lang/setup-dart@v1 |
| 51 | + |
| 52 | + - name: Publish to pub.dev |
| 53 | + working-directory: dart/packages/fory |
| 54 | + run: dart pub publish --force |
0 commit comments