-
Notifications
You must be signed in to change notification settings - Fork 38
48 lines (45 loc) · 1.26 KB
/
release.yaml
File metadata and controls
48 lines (45 loc) · 1.26 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
45
46
47
48
name: Release
on:
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name for release (e.g. "v1.0.0")'
required: true
permissions:
id-token: write
attestations: write
contents: write
jobs:
create-release-tag:
name: Create release tag
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create tag
uses: actions/github-script@v7
with:
script: |
const tag = '${{ github.event.inputs.tag_name }}';
const commitTag = await github.rest.git.createTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag,
message: tag,
object: context.sha,
type: 'commit',
});
await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${tag}`,
sha: commitTag.data.sha,
});
release:
uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@v7.2.3
needs: create-release-tag
with:
release_files: rules_buf-*.tar.gz
prerelease: false
draft: true
tag_name: ${{ github.event.inputs.tag_name }}