setup-bazel/.github/workflows/release.yml
renovate[bot] 6fe279591f
Update actions/checkout action to v6 (#109)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-04 07:14:46 -08:00

37 lines
1.1 KiB
YAML

name: Release
run-name: Release ${{ inputs.tag }}
on:
workflow_dispatch:
inputs:
tag:
description: Tag to release
required: true
default: 0.1.0
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
cache: npm
node-version-file: package.json
- run: |
sed -ri 's/"version": ".+"/"version": "${{ inputs.tag }}"/' package.json
sed -ri 's/setup-bazel@.+$/setup-bazel@${{ inputs.tag }}/g' README.md
- run: npm install
- run: npm run build
- run: |
git config user.name github-actions
git config user.email github-actions@github.com
- run: git commit -am "Release ${{ inputs.tag }}"
- run: git push
- run: git tag -a ${{ inputs.tag }} -m "Release ${{ inputs.tag }}"
- run: git push --tags
- run: gh release create ${{ inputs.tag }} --generate-notes
env:
GH_TOKEN: ${{ github.token }}