Create Release #43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
permissions: write-all | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Create Release | |
run: | | |
set -euo pipefail | |
git config user.name "${{ github.triggering_actor }}" | |
git config user.email "${{ github.triggering_actor }}@users.noreply.github.com" | |
sha=$(git rev-parse HEAD) | |
git archive --format=tar --prefix="${NAME}-${TAG}/" $sha | gzip > "${NAME}-${TAG}.tar.gz" | |
gh release create "v$TAG" --title "$TAG" --target $sha --generate-notes "${NAME}-${TAG}.tar.gz" | |
env: | |
NAME: "rules_poetry" | |
TAG: ${{ inputs.tag }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |