Skip to content

feat: Add function to create and delete users, hosts, and services mo… #18

feat: Add function to create and delete users, hosts, and services mo…

feat: Add function to create and delete users, hosts, and services mo… #18

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.x"
- run: python3 craft.py
- run: |
cd $GITHUB_WORKSPACE
ls -al
git fetch --all
git fetch --tags
git tag -l
LATEST_TAG=`git tag --sort=refname |tail -n 2 |head -n 1`
echo "LATEST_TAG: $LATEST_TAG"
NEW_TAG=`git tag --sort=refname |tail -n 1`
echo "NEW_TAG: $NEW_TAG"
git log --format='%(trailers:key=Type,valueonly,separator=%x20)%x1c%s [%(trailers:key=Issue,valueonly,separator=,)]' $LATEST_TAG..$NEW_TAG | awk -F "\034" '{
gsub(/\[\]$/, "", $2);
if (length($1) == 0) $1="";
if (!($1 in item_count)) item_count[$1]=0;
items[$1, item_count[$1]]=$2;
item_count[$1]++;
}
END {
for (k in item_count) {
print k;
k2=k;
gsub(/./, "-", k2);
print k2
for (i=0; i<item_count[k]; i++) print "- "items[k, i];
print ""
}
}' > commit_notes
cat commit_notes
echo "Begin Creating Release..."
python3 ./releaser.py commit_notes > version.txt
echo "Create successful!"
cat version.txt
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body_path: ${{ github.workspace }}/version.txt
files: |
${{ github.workspace }}/createhackenv.sh