Skip to content

remove extra rest api docs #34

remove extra rest api docs

remove extra rest api docs #34

name: Public - Tag Release
on:
pull_request:
types:
- closed
branches:
- main
jobs:
tag_release:
if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') && github.repository == 'BC-Security/Empire' }}
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0
- name: Initialize mandatory git config
run: |
git config user.name "GitHub Actions"
git config user.email [email protected]
- name: Find last released tag
run: |
tags=$(git tag --list --sort=-version:refname "v*.*.*")
tags=$(echo "$tags" | grep -v -E "beta|alpha|rc|RC")
latest_tag=$(echo "$tags" | head -n 1)
echo "LATEST_TAG=$latest_tag" >> $GITHUB_ENV
- name: Get app version
run: |
# Get the version from pyproject.toml using sed
echo "APP_VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml)" >> $GITHUB_ENV
- name: Extract release notes
id: extract_release_notes
# This is modified to pull multiple versions of the release notes
uses: vinnybod/extract-release-notes@v2
with:
last_version: ${{ env.LATEST_TAG }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
tag_name: v${{ env.APP_VERSION }}
release_name: v${{ env.APP_VERSION }}
body: ${{ steps.extract_release_notes.outputs.release_notes }}
draft: false
prerelease: false