π Bump to Version: 0.10.2 #67
Workflow file for this run
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: Git tag | |
on: | |
pull_request_target: | |
types: | |
- closed | |
jobs: | |
tag: | |
name: Git Tag | |
runs-on: ubuntu-latest | |
outputs: | |
TAG_NAME: ${{ steps.version_number.outputs.TAG_NAME }} | |
if: contains( github.event.pull_request.labels.*.name, 'release') && github.event.pull_request.merged == true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup git config | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
- name: Parse Tag name | |
id: version_number | |
run: | | |
TAG_NAME=$(echo "${{ github.event.pull_request.title }}" | awk '{print $5}') | |
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_OUTPUT | |
- name: Git tag & push | |
run: | | |
echo "Tagging Commit: ${{ github.sha }} with ${{ steps.version_number.outputs.TAG_NAME }}" | |
git tag ${{ steps.version_number.outputs.TAG_NAME }} | |
git push --tags | |
release: | |
name: Release Tagged version | |
needs: tag | |
runs-on: ubuntu-latest | |
if: contains( github.event.pull_request.labels.*.name, 'auto-release') | |
steps: | |
- name: Get Release Body | |
id: get_release_body | |
uses: actions/github-script@v6 | |
with: | |
result-encoding: string | |
script: | | |
const pr_text = context.payload.pull_request.body; | |
var lines = pr_text.split('\n'); | |
lines.splice(0,1); | |
return lines.join('\n') | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ needs.tag.outputs.TAG_NAME}} | |
release_name: ${{ needs.tag.outputs.TAG_NAME }} | |
body: ${{ steps.get_release_body.outputs.result }} | |
draft: false | |
prerelease: false | |
publish: | |
name: Publish Release | |
needs: release | |
uses: ./.github/workflows/version-publish.yml | |
secrets: | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} |