Skip to content

Upload new release

Upload new release #64

Workflow file for this run

name: Upload new release
on:
workflow_dispatch:
inputs:
tag:
description: Version to use for release tag
required: true
commit:
description: Commit to use for tag
required: false
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
env:
INPUT_COMMIT: ${{ github.evens.input.commit }}
steps:
- name: Checkout HEAD
uses: actions/checkout@v3
- name: Determine commit
id: determine-commit
run: |
if [[ ${INPUT_COMMIT} != '' ]]; then
echo "commit=${{ github.events.input.commit }}" >> "$GITHUB_OUTPUT"
else
echo "commit=${GITHUB_SHA}" >> "$GITHUB_OUTPUT"
fi
- name: Create new tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ github.events.input.tag }}
commit_sha: ${{ needs.determine-commit.outputs.commit }}
tag_prefix: ""
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}