name: Tag and Release on: push: branches: [ release ] workflow_dispatch: jobs: Release: runs-on: ubuntu-latest steps: - name: Checkout the repo uses: actions/checkout@v2 - name: Extract version run: | version="$(grep -E '^[0-9]+_[0-9]+_[0-9]+' VERSION | sed 's/_/./g')" echo $version echo ::set-output name=apbs-version::${version} echo ::set-output name=apbs-tag::v${version} ./.extract_section.sh -v ${version} -f docs/releases.rst > this_release.rst cat this_release.rst shell: bash id: extract-version - name: Convert release text to markdown uses: docker://pandoc/core:2.16.2 with: args: >- --standalone --from rst --to markdown --output=this_release.md this_release.rst - name: Check release text run: cat this_release.md - name: Create tag uses: tvdias/github-tagger@v0.0.1 with: repo-token: "${{ secrets.RELEASE_TOKEN }}" tag: ${{ steps.extract-version.outputs.apbs-tag }} - name: Create Release uses: softprops/action-gh-release@v1 env: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} with: body_path: this_release.md tag_name: ${{ steps.extract-version.outputs.apbs-tag }}