Test Publish Release #484
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: Test Publish Release | |
on: | |
workflow_dispatch: | |
inputs: | |
tool-version: | |
description: 'The version of the tool to release' | |
required: true | |
default: 'v1.0.0' | |
permissions: | |
contents: write | |
jobs: | |
release: | |
name: Release pushed tag | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Configure Git User | |
run: | | |
git config --global user.email "priyagupta108@github.com" | |
git config --global user.name "priya gupta" | |
- name: Tag and Push Release | |
run: | | |
git tag -a ${{ github.event.inputs.tool-version }} -m "Release ${{ github.event.inputs.tool-version }}" | |
git push origin ${{ github.event.inputs.tool-version }} | |
- name: Publish Release | |
id: create_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
LATEST_COMMIT=$(git rev-parse HEAD) | |
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) | |
gh release create "${{ github.event.inputs.tool-version }}-${{ github.run_id }}" --draft --title "Release $LATEST_COMMIT" \ | |
--notes "${{ steps.generate-release-body.outputs.RELEASE_BODY }}" \ | |
"https://github.com/priyagupta108/sample-python/archive/refs/tags/v1.0.0.zip#sample-python-v1.0.0.zip" \ | |
"https://github.com/priyagupta108/sample-python/archive/refs/tags/v1.0.0.tar.gz#sample-python-v1.0.0.tar.gz" |