Release Project #31
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 2025 Google LLC | |
# | |
# 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 | |
# | |
# https://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. | |
name: Release Project | |
# TODO(dramaix): Consider triggering the workflow on git tag creation instead. | |
# This workflow is triggered manually from the Actions tab. | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'The version to release' | |
required: true | |
type: string | |
sonatype_auto_publish: | |
description: 'Automatically publish the release to Sonatype' | |
type: boolean | |
required: true | |
default: false | |
continue_if_tag_exists: | |
description: 'Continue the workflow even if the GitHub tag already exists' | |
type: boolean | |
required: true | |
default: false | |
jobs: | |
release: | |
uses: google/j2cl/.github/workflows/release_common.yaml@master | |
permissions: | |
# Permissions for creating a github release. | |
contents: write | |
# Permissions for publishing to bcr. | |
id-token: write | |
attestations: write | |
# Pass the inputs from the manual trigger to the reusable workflow. | |
with: | |
version: ${{ github.event.inputs.version }} | |
publish_to_sonatype: true | |
sonatype_auto_publish: ${{ github.event.inputs.sonatype_auto_publish == 'true' }} | |
continue_if_tag_exists: ${{ github.event.inputs.continue_if_tag_exists == 'true' }} | |
# Allow the reusable workflow to access the secrets. | |
secrets: inherit |