Skip to content

Commit

Permalink
added extra release info
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2005 committed Sep 21, 2021
1 parent e8f04ed commit 54e8b3a
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 5 deletions.
31 changes: 26 additions & 5 deletions .github/workflows/pifile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
version:
outputs:
version: ${{ steps.get_version.outputs.version }}
buildname: ${{ steps.get_version.outputs.buildname }}
runs-on: "ubuntu-latest"
steps:
-
Expand All @@ -23,6 +24,17 @@ jobs:
else
echo ::set-output name=version::"${version}"
fi
raw=$(git branch -r --contains ${{ github.ref }})
branch=${raw/origin\/}
builddate=$(date '+%Y-%m-%d')
buildbranch='crankshaft-ng'
buildhash=$(git rev-parse --short "$GITHUB_SHA")
buildname="${builddate}-${buildbranch}-${buildhash}"
echo ::set-output name=version::${VERSION}
echo ::set-output name=buildhash::${buildhash}
echo ::set-output name=buildbranch::${buildbranch}
echo ::set-output name=builddate::${builddate}
echo ::set-output name=buildname::${buildname}
env:
version: ${{ github.event.inputs.version }}
build:
Expand Down Expand Up @@ -70,13 +82,13 @@ jobs:
pifile: ${{ matrix.config.basefile }}.Pifile
-
name: Rename Image
run: mv ${{ matrix.config.basefile }}.img crankshaft-${{ steps.get_version.outputs.version }}.img
run: mv ${{ matrix.config.basefile }}.img crankshaft-${{needs.version.outputs.buildname }}.img
-
name: Package zip
id: packagezip
run: |
IMG_FILENAME="crankshaft-${{ steps.get_version.outputs.version }}.img"
ZIP_FILENAME="crankshaft-${{ steps.get_version.outputs.version }}.zip"
IMG_FILENAME="crankshaft-${{needs.version.outputs.buildname }}.img"
ZIP_FILENAME="crankshaft-${{needs.version.outputs.buildname }}.zip"
MD5HASH="${IMG_FILENAME}.md5"
SHA1HASH="${IMG_FILENAME}.sha1"
SHA256HASH="${IMG_FILENAME}.sha256"
Expand Down Expand Up @@ -107,6 +119,14 @@ jobs:
outputs:
release_upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
steps:
-
name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v1
with:
configuration: ".github/workflows/releasecfg/configuration.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Create GitHub release
id: create_release
Expand All @@ -116,6 +136,7 @@ jobs:
with:
tag_name: ${{needs.version.outputs.version }}
release_name: Release ${{needs.version.outputs.version }}
body: ${{steps.github_release.outputs.changelog}}
draft: true
prerelease: true
# Upload release artifacts
Expand Down Expand Up @@ -165,8 +186,8 @@ jobs:
name: Get Artifact Filenames
id: getfilenames
run: |
IMG_FILENAME="crankshaft-${{ steps.get_version.outputs.version }}.img"
ZIP_FILENAME="crankshaft-${{ steps.get_version.outputs.version }}.zip"
IMG_FILENAME="crankshaft-${{needs.version.outputs.buildname }}.img"
ZIP_FILENAME="crankshaft-${{needs.version.outputs.buildname }}.zip"
MD5HASH="${IMG_FILENAME}.md5"
SHA1HASH="${IMG_FILENAME}.sha1"
SHA256HASH="${IMG_FILENAME}.sha256"
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/releasecfg/configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"categories": [
{
"title": "## 🚀 Features",
"labels": ["feature"]
},
{
"title": "## 🐛 Fixes",
"labels": ["fix"]
},
{
"title": "## 🧪 Tests",
"labels": ["test"]
}
],
"sort": "ASC",
"template": "${{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n${{UNCATEGORIZED}}\n</details>",
"pr_template": "- ${{TITLE}}\n - PR: #${{NUMBER}}",
"empty_template": "- no changes",
"transformers": [
{
"pattern": "[\\-\\*] (\\[(...|TEST|CI|SKIP)\\])( )?(.+?)\n(.+?[\\-\\*] )(.+)",
"target": "- $4\n - $6"
}
],
"max_tags_to_fetch": 200,
"max_pull_requests": 200,
"max_back_track_time_days": 90,
"exclude_merge_branches": [
"Owner/qa"
]
}

0 comments on commit 54e8b3a

Please sign in to comment.