blob: db17fe0caa1c0d69b6949a6cd3553b985b8e589c [file]
name: Create Release
on:
workflow_dispatch:
inputs:
tag:
description: 'The new version to tag, ex: 1.0.5'
required: true
type: string
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create Release
run: |
set -euo pipefail
archive="buildifier-prebuilt.$TAG.tar.gz"
COPYFILE_DISABLE=1 tar czvf "$archive" ./*
gh api repos/${{ github.repository }}/releases/generate-notes -f tag_name="$TAG" -f target_commitish="$GITHUB_REF_NAME" --jq .body > notes.md
./.github/generate-notes.sh "$TAG" "$archive" >> notes.md
gh release create "$TAG" --title "$TAG" --target "$GITHUB_REF_NAME" --notes-file notes.md "$archive"
env:
TAG: ${{ inputs.tag }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}