| 1 |
# Copyright 2023 The Bazel Authors. All rights reserved. |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
# See the License for the specific language governing permissions and |
| 13 |
# limitations under the License. |
| 14 |
|
| 15 |
# Cut a release whenever a new tag is pushed to the repo. |
| 16 |
name: Release |
| 17 |
|
| 18 |
on: |
| 19 |
workflow_dispatch: |
| 20 |
inputs: |
| 21 |
prerelease: |
| 22 |
description: If set, publish this as a release candidate / prerelease version. |
| 23 |
type: boolean |
| 24 |
required: true |
| 25 |
|
| 26 |
jobs: |
| 27 |
build: |
| 28 |
permissions: |
| 29 |
contents: write |
| 30 |
runs-on: ubuntu-22.04 |
| 31 |
steps: |
| 32 |
- name: Checkout |
| 33 |
uses: actions/checkout@v4 |
| 34 |
- name: Create release archive |
| 35 |
id: create_archive |
| 36 |
run: .github/workflows/create_archive.sh |
| 37 |
- name: Release |
| 38 |
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1 |
| 39 |
with: |
| 40 |
name: ${{ steps.create_archive.outputs.jsonnet_version }} |
| 41 |
tag_name: ${{ steps.create_archive.outputs.jsonnet_version }} |
| 42 |
prerelease: ${{ inputs.prerelease }} |
| 43 |
draft: true |
| 44 |
fail_on_unmatched_files: true |
| 45 |
files: jsonnet-*.tar.gz |