-
-
Notifications
You must be signed in to change notification settings - Fork 289
44 lines (38 loc) · 1.25 KB
/
release.yml
File metadata and controls
44 lines (38 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Cut a release whenever a new tag is pushed to the repo.
# You should use an annotated tag, like `git tag -a v1.2.3`.
name: Release
on:
push:
tags:
- 'v*.*.*'
# In case of problems, enable manual dispatch from the GitHub UI.
workflow_dispatch:
inputs:
tag_name:
required: true
type: string
# Uses the `release_ruleset` workflow to generate provenance attestation files
# referenced by the `publish-to-bcr` workflow.
#
# Based on .github/workflows/release.yml from aspect-build/rules_lint v1.3.5.
# See .bcr/README.md.
permissions:
attestations: write # Needed to attest provenance
contents: write # Needed to create release
id-token: write # Needed to attest provenance
jobs:
release:
uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@v7.4.0
with:
bazel_test_command: "bazel test //src/... //test/... //third_party/..."
prerelease: false
draft: true
release_files: rules_scala-*.tar.gz
tag_name: ${{ inputs.tag_name || github.ref_name }}
publish-to-bcr:
needs: release
uses: ./.github/workflows/publish-to-bcr.yml
with:
tag_name: ${{ inputs.tag_name || github.ref_name }}
secrets:
bcr_publish_token: ${{ secrets.bcr_publish_token }}