Skip to content

test

test #51

Workflow file for this run

# Copyright 2025 Google LLC

Check failure on line 1 in .github/workflows/release.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yaml

Invalid workflow file

(Line: 43, Col: 9): Unrecognized named-value: 'env'. Located at position 1 within expression: env.publish_to_bcr, (Line: 56, Col: 28): Unrecognized named-value: 'env'. Located at position 1 within expression: env.publish_to_sonatype, (Line: 57, Col: 31): Unrecognized named-value: 'env'. Located at position 1 within expression: env.continue_if_tag_exists, (Line: 64, Col: 9): Unrecognized named-value: 'env'. Located at position 2 within expression: !env.publish_to_bcr, (Line: 74, Col: 28): Unrecognized named-value: 'env'. Located at position 1 within expression: env.publish_to_sonatype, (Line: 75, Col: 31): Unrecognized named-value: 'env'. Located at position 1 within expression: env.continue_if_tag_exists
#
# 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.0rg/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
permissions:
contents: read
# This workflow is triggered manually from the Actions tab.
on:
workflow_dispatch:
inputs:
version:
description: 'The version to release'
required: true
type: string
continue_if_tag_exists:
description: 'Continue the workflow even if the GitHub tag already exists'
type: boolean
required: true
default: false
env:
publish_to_bcr: ${{ github.event.repository.name != 'jsinterop-annotations' }}
publish_to_sonatype: ${{ github.event.repository.name != 'jsinterop-generator' && github.event.repository.name != 'j2cl' }}
continue_if_tag_exists: ${{ github.event.inputs.continue_if_tag_exists == 'true' }}
jobs:
# We need two separate jobs based on whether we are releasing to BCR. Releasing to BCR requires
# elevated permissions, which cannot be set dynamically within a single job.
# TODO(dramaix): merge release_common.yaml into this file and remove the need for two jobs.
release_with_bcr:
if: ${{ env.publish_to_bcr }}
uses: ./.github/workflows/release_common.yaml
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: ${{ env.publish_to_sonatype }}
continue_if_tag_exists: ${{ env.continue_if_tag_exists }}
publish_to_bcr: true
# Allow the reusable workflow to access the secrets.
secrets: inherit
release_without_bcr:
if: ${{ !env.publish_to_bcr }}
uses: ./.github/workflows/release_common.yaml
permissions:
# Permissions for creating a github release.
contents: write
# Pass the inputs from the manual trigger to the reusable workflow.
with:
version: ${{ github.event.inputs.version }}
publish_to_sonatype: ${{ env.publish_to_sonatype }}
continue_if_tag_exists: ${{ env.continue_if_tag_exists }}
publish_to_bcr: false
# Allow the reusable workflow to access the secrets.
secrets: inherit