v0.9.6 #5
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This file is part of Astarte. | |
| # | |
| # Copyright 2025 SECO Mind Srl | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: publish | |
| # When a release is published or called manually | |
| on: | |
| release: | |
| types: | |
| - published | |
| workflow_dispatch: | |
| # Only needs to clone the repository | |
| permissions: | |
| contents: read | |
| # Safer shell | |
| defaults: | |
| run: | |
| shell: bash | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| # It's not safe to cancel the publish | |
| cancel-in-progress: false | |
| jobs: | |
| # Check that the create can be compiled with only the packaged files | |
| for-publish: | |
| name: stable / for-publish | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt-get -y install libsqlite3-dev libssl-dev | |
| - name: Install sccache-cache | |
| uses: mozilla-actions/sccache-action@v0.0.7 | |
| - name: Install stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - run: ./scripts/check-for-publish.sh | |
| publish: | |
| name: stable / publish | |
| needs: [for-publish] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt-get -y install libsqlite3-dev libssl-dev | |
| - name: Install stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: publish creates | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| # Publish the crates in order of dependency | |
| run: | | |
| cargo publish --locked -p astarte-device-sdk-derive | |
| cargo publish --locked -p astarte-device-sdk | |
| cargo publish --locked -p astarte-device-sdk-mock |