Automation (#18)
* updated tag logic --------- Co-authored-by: dutchie032 <dutchie032>
This commit is contained in:
committed by
GitHub
co-authored by
dutchie032 <dutchie032>
parent
c98b333fe5
commit
41b794616e
@@ -18,6 +18,7 @@ on:
|
|||||||
default: patch
|
default: patch
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- automation
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -46,47 +47,53 @@ jobs:
|
|||||||
- name: Generate Release Notes
|
- name: Generate Release Notes
|
||||||
id: generate_release_notes
|
id: generate_release_notes
|
||||||
run: |
|
run: |
|
||||||
git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:'- %s%n %b' > release_notes.txt
|
if [ "${{ inputs.release_candidate }}" != "true" ]; then
|
||||||
|
git log $(git describe --tags --abbrev=0 $(git tag --sort=-v:refname | grep -v '-rc' | head -n 1))..HEAD --pretty=format:'- %s%n %b' > release_notes.txt
|
||||||
|
else
|
||||||
|
git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:'- %s%n %b' > release_notes.txt
|
||||||
|
fi
|
||||||
|
awk -i inplace '!seen[$0]++' release_notes.txt
|
||||||
cat release_notes.txt
|
cat release_notes.txt
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
# - name: Check Change size PC
|
- name: Check Change size PC
|
||||||
# id: retag
|
id: retag
|
||||||
# run: |
|
run: |
|
||||||
# tag="${{ steps.tag_version_dry.outputs.new_tag }}"
|
tag="${{ steps.tag_version_dry.outputs.new_tag }}"
|
||||||
# if [ "${{ inputs.release_candidate }}" = "true" ]; then
|
if [ "${{ inputs.release_candidate }}" = "true" ]; then
|
||||||
# echo "tag=$tag-rc" >> "$GITHUB_OUTPUT"
|
echo "tag=$tag-rc" >> "$GITHUB_OUTPUT"
|
||||||
# else
|
else
|
||||||
# echo "tag=$tag" >> "$GITHUB_OUTPUT"
|
echo "tag=$tag" >> "$GITHUB_OUTPUT"
|
||||||
# fi
|
fi
|
||||||
|
|
||||||
# - name: Calculate Tag
|
- name: Calculate Tag
|
||||||
# id: tag_version
|
id: tag_version
|
||||||
# uses: mathieudutour/github-tag-action@v6.2
|
uses: mathieudutour/github-tag-action@v6.2
|
||||||
# with:
|
with:
|
||||||
# github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# tag_prefix : ""
|
tag_prefix : ""
|
||||||
# custom_tag : ${{ steps.retag.outputs.tag }}
|
custom_tag : ${{ steps.retag.outputs.tag }}
|
||||||
|
|
||||||
|
|
||||||
# - name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
# uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
# id: create_release
|
id: create_release
|
||||||
# with:
|
with:
|
||||||
# tag_name: ${{ steps.tag_version.outputs.new_tag }}
|
tag_name: ${{ steps.tag_version.outputs.new_tag }}
|
||||||
# release_name: Release ${{ steps.tag_version.outputs.new_tag }}
|
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
|
||||||
# draft: true
|
draft: true
|
||||||
# body: ${{ steps.tag_version.outputs.changelog }}
|
body_path: release_notes.txt
|
||||||
# prerelease: ${{ inputs.release_candidate }}
|
prerelease: ${{ inputs.release_candidate }}
|
||||||
# env:
|
env:
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# - name: Upload Spearhead.lua Asset
|
- name: Upload Spearhead.lua Asset
|
||||||
# uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
# env:
|
env:
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# with:
|
with:
|
||||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
# asset_path: ./output/spearhead.lua
|
asset_path: ./output/spearhead.lua
|
||||||
# asset_name: spearhead.lua
|
asset_name: spearhead.lua
|
||||||
# asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user