Skip to content

chore(bump): bump cookiecutter-nist-python from 0.14.1 to 0.14.2 #86

chore(bump): bump cookiecutter-nist-python from 0.14.1 to 0.14.2

chore(bump): bump cookiecutter-nist-python from 0.14.1 to 0.14.2 #86

Workflow file for this run

name: Create github release
on:
pull_request:
types:
- closed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# for debugging
# info:
# if: github.event.pull_request.merged == true
# runs-on: ubuntu-latest
# permissions: {}
# steps:
# - name: PR info
# env:
# RELEASE_COMMIT: ${{ github.event.pull_request.merge_commit_sha }}
# RELEASE_BRANCH: ${{ github.head_ref }}
# OWNER: ${{ github.repository_owner }}
# RELEASE: ${{ format('{0}', startsWith(github.head_ref, 'release/')) }}
# run: |
# echo "RELEASE_COMMIT - $RELEASE_COMMIT"
# echo "RELEASE_BRANCH - $RELEASE_BRANCH"
# echo "OWNER - $OWNER"
# echo "RELEASE - $RELEASE"
create-release:
name: Create release
if:
# prettier-ignore
github.event.pull_request.merged == true && github.repository_owner == 'usnistgov' && startsWith(github.head_ref, 'release/')
runs-on: ubuntu-latest
environment:
name: pull-request
permissions:
contents: write
steps:
- name: PR info
env:
RELEASE_COMMIT: ${{ github.event.pull_request.merge_commit_sha }}
RELEASE_BRANCH: ${{ github.head_ref }}
OWNER: ${{ github.repository_owner }}
RELEASE: ${{ format('{0}', startsWith(github.head_ref, 'release/')) }}
run: |
echo "RELEASE_COMMIT - $RELEASE_COMMIT"
echo "RELEASE_BRANCH - $RELEASE_BRANCH"
echo "OWNER - $OWNER"
echo "RELEASE - $RELEASE"
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
sparse-checkout: |
pyproject.toml
sparse-checkout-cone-mode: false
- name: Setup python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ">=3.11"
- name: Get version
id: version
shell: python
run: |
import os
import tomllib
from pathlib import Path
version = tomllib.loads(Path("pyproject.toml").read_text())["project"]["version"]
tag = f"v{version}"
print("{tag=:s}")
with open(os.getenv("GITHUB_OUTPUT"), "a") as f:
f.write(f"{tag=:s}\n")
- name: Create GitHub release
env:
GH_TOKEN: ${{ secrets.PAT }}
RELEASE_COMMIT: ${{ github.event.pull_request.merge_commit_sha }}
TAG: ${{ steps.version.outputs.tag }}
run: |
gh release create "$TAG" --generate-notes --target "$RELEASE_COMMIT"