Release #763
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
| # | |
| # Copyright (c) 2022 ZettaScale Technology | |
| # | |
| # This program and the accompanying materials are made available under the | |
| # terms of the Eclipse Public License 2.0 which is available at | |
| # http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | |
| # which is available at https://www.apache.org/licenses/LICENSE-2.0. | |
| # | |
| # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | |
| # | |
| # Contributors: | |
| # ZettaScale Zenoh Team, <zenoh@zettascale.tech> | |
| # | |
| name: Release | |
| on: | |
| # Dispatch only. The weekday schedule this had ran a dry-run release every | |
| # night with no inputs, which means no `zenoh-flat-jni-version` - so it | |
| # resolved the unreleased fallback in gradle.properties and died compiling, | |
| # every night. A release is a deliberate act, and rehearsing one is a | |
| # deliberate act too; both are `Run workflow` here. See PUBLISHING.md. | |
| workflow_dispatch: | |
| inputs: | |
| live-run: | |
| type: boolean | |
| description: Live-run | |
| required: false | |
| version: | |
| type: string | |
| description: Release number | |
| required: false | |
| zenoh-flat-jni-version: | |
| type: string | |
| description: zenoh-flat-jni release to build against (must already be on Maven Central) | |
| required: false | |
| branch: | |
| type: string | |
| description: Release branch | |
| required: false | |
| maven_publish: | |
| type: boolean | |
| description: Publish the package to Maven Central | |
| required: false | |
| default: true | |
| jobs: | |
| tag: | |
| name: Branch, Bump & tag | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.create-release-branch.outputs.version }} | |
| branch: ${{ steps.create-release-branch.outputs.branch }} | |
| steps: | |
| - id: create-release-branch | |
| uses: eclipse-zenoh/ci/create-release-branch@main | |
| with: | |
| repo: ${{ github.repository }} | |
| live-run: ${{ inputs.live-run || false }} | |
| version: ${{ inputs.version }} | |
| branch: ${{ inputs.branch }} | |
| github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }} | |
| # Third-party actions are pinned to a commit, with the version in a | |
| # trailing comment: a tag is mutable, and a moved tag runs code nobody | |
| # reviewed. The eclipse-zenoh/ci actions above and below are ours, and stay | |
| # on a branch. | |
| - name: Checkout this repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: ${{ steps.create-release-branch.outputs.branch }} | |
| - name: Bump and tag project | |
| run: bash ci/scripts/bump-and-tag.bash | |
| env: | |
| LIVE_RUN: ${{ inputs.live-run || false }} | |
| VERSION: ${{ steps.create-release-branch.outputs.version }} | |
| FLAT_JNI_VERSION: ${{ inputs.zenoh-flat-jni-version }} | |
| GIT_USER_NAME: eclipse-zenoh-bot | |
| GIT_USER_EMAIL: eclipse-zenoh-bot@users.noreply.github.com | |
| publish: | |
| name: Publish to Maven Central | |
| needs: tag | |
| uses: ./.github/workflows/publish.yml | |
| with: | |
| snapshot: ${{ !(inputs.live-run || false) }} | |
| branch: ${{ needs.tag.outputs.branch }} | |
| maven_publish: ${{ !contains(inputs.maven_publish, 'false') }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| secrets: inherit | |
| publish-dokka: | |
| name: Publish documentation | |
| needs: [tag, publish] | |
| uses: ./.github/workflows/publish-dokka.yml | |
| with: | |
| live-run: ${{ inputs.live-run || false }} | |
| branch: ${{ needs.tag.outputs.branch }} | |
| # peaceiris/actions-gh-pages pushes the generated site to the gh-pages | |
| # branch, which the default read-only token cannot do. | |
| permissions: | |
| contents: write | |
| secrets: inherit | |
| publish-github: | |
| needs: [tag, publish] | |
| runs-on: macos-latest | |
| steps: | |
| - uses: eclipse-zenoh/ci/publish-crates-github@main | |
| with: | |
| repo: ${{ github.repository }} | |
| live-run: ${{ inputs.live-run || false }} | |
| version: ${{ needs.tag.outputs.version }} | |
| branch: ${{ needs.tag.outputs.branch }} | |
| github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }} |