|
| 1 | +# Copyright (c) 2019 jmjoy |
| 2 | +# PHPER is licensed under Mulan PSL v2. |
| 3 | +# You can use this software according to the terms and conditions of the Mulan |
| 4 | +# PSL v2. You may obtain a copy of Mulan PSL v2 at: |
| 5 | +# http://license.coscl.org.cn/MulanPSL2 |
| 6 | +# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY |
| 7 | +# KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO |
| 8 | +# NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. |
| 9 | +# See the Mulan PSL v2 for more details. |
| 10 | + |
| 11 | +name: Publish |
| 12 | + |
| 13 | +on: |
| 14 | + push: |
| 15 | + tags: [ "**" ] |
| 16 | + |
| 17 | +env: |
| 18 | + RUST_LOG: debug |
| 19 | + CARGO_TERM_COLOR: always |
| 20 | + RUST_BACKTRACE: "1" |
| 21 | + RUSTFLAGS: "-D warnings" |
| 22 | + LLVM_CONFIG_PATH: llvm-config-10 |
| 23 | + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
| 24 | + |
| 25 | +jobs: |
| 26 | + publish: |
| 27 | + name: Publish |
| 28 | + |
| 29 | + runs-on: ubuntu-latest |
| 30 | + steps: |
| 31 | + - name: Checkout |
| 32 | + uses: actions/checkout@v2 |
| 33 | + |
| 34 | + - name: Git config |
| 35 | + shell: bash |
| 36 | + run: | |
| 37 | + git config --global user.email "[email protected]" |
| 38 | + git config --global user.name "jmjoy" |
| 39 | +
|
| 40 | + - name: Install libclang |
| 41 | + run: sudo apt-get install -y llvm-10-dev libclang-10-dev |
| 42 | + |
| 43 | + - name: Setup PHP |
| 44 | + uses: shivammathur/setup-php@v2 |
| 45 | + with: |
| 46 | + php-version: 7.4 |
| 47 | + tools: php-config |
| 48 | + |
| 49 | + - name: Install Rust Stable |
| 50 | + uses: actions-rs/toolchain@v1 |
| 51 | + with: |
| 52 | + toolchain: stable |
| 53 | + override: true |
| 54 | + |
| 55 | + - name: Cargo publish phper-sys |
| 56 | + uses: actions-rs/cargo@v1 |
| 57 | + with: |
| 58 | + command: publish |
| 59 | + args: --manifest-path phper-sys/Cargo.toml |
| 60 | + |
| 61 | + - name: Delay |
| 62 | + run: sleep 20 |
| 63 | + |
| 64 | + - name: Cargo publish phper-build |
| 65 | + uses: actions-rs/cargo@v1 |
| 66 | + with: |
| 67 | + command: publish |
| 68 | + args: --manifest-path phper-build/Cargo.toml |
| 69 | + |
| 70 | + - name: Delay |
| 71 | + run: sleep 20 |
| 72 | + |
| 73 | + - name: Cargo publish phper-macros |
| 74 | + uses: actions-rs/cargo@v1 |
| 75 | + with: |
| 76 | + command: publish |
| 77 | + args: --manifest-path phper-macros/Cargo.toml |
| 78 | + |
| 79 | + - name: Delay |
| 80 | + run: sleep 20 |
| 81 | + |
| 82 | + - name: Cargo publish phper-alloc |
| 83 | + uses: actions-rs/cargo@v1 |
| 84 | + with: |
| 85 | + command: publish |
| 86 | + args: --manifest-path phper-alloc/Cargo.toml |
| 87 | + |
| 88 | + - name: Delay |
| 89 | + run: sleep 20 |
| 90 | + |
| 91 | + - name: Cargo publish phper-test |
| 92 | + uses: actions-rs/cargo@v1 |
| 93 | + with: |
| 94 | + command: publish |
| 95 | + args: --manifest-path phper-test/Cargo.toml |
| 96 | + |
| 97 | + - name: Delay |
| 98 | + run: sleep 20 |
| 99 | + |
| 100 | + - name: Cargo publish phper |
| 101 | + uses: actions-rs/cargo@v1 |
| 102 | + with: |
| 103 | + command: publish |
| 104 | + args: --manifest-path phper/Cargo.toml |
0 commit comments