fetch depth

This commit is contained in:
2025-04-22 21:36:53 +02:00
parent dc27683aad
commit af93a76554
+45 -54
View File
@@ -34,68 +34,59 @@ jobs:
mkdir -p ./output mkdir -p ./output
python3 SpearheadCompile.py . ./output/spearhead.lua python3 SpearheadCompile.py . ./output/spearhead.lua
- name: Calculate Tag
id: tag_version_dry
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: ${{ inputs.change_size }}
custom_release_rules: ""
dry_run: true
- name: Check Change size PC
id: retag
run: |
tag="${{ steps.tag_version_dry.outputs.new_tag }}"
if [ "${{ inputs.release_candidate }}" = "true" ]; then
echo "tag=$tag-rc" >> "$GITHUB_OUTPUT"
else
echo "tag=$tag" >> "$GITHUB_OUTPUT"
fi
- name: Calculate Tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix : ""
custom_tag : ${{ steps.retag.outputs.tag }}
- name: Create GitHub Release
uses: actions/create-release@v1
id: create_release
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
draft: true
body: ${{ steps.tag_version.outputs.changelog }}
prerelease: ${{ inputs.release_candidate }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Spearhead.lua Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./output/spearhead.lua
asset_name: spearhead.lua
asset_content_type: application/octet-stream
- 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' > release_notes.txt git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:'- %s%n %b' > release_notes.txt
cat release_notes.txt cat release_notes.txt
shell: bash shell: bash
# - name: Upload Release Notes # - name: Calculate Tag
# id: tag_version_dry
# uses: mathieudutour/github-tag-action@v6.2
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# default_bump: ${{ inputs.change_size }}
# custom_release_rules: ""
# dry_run: true
# - name: Check Change size PC
# id: retag
# run: |
# tag="${{ steps.tag_version_dry.outputs.new_tag }}"
# if [ "${{ inputs.release_candidate }}" = "true" ]; then
# echo "tag=$tag-rc" >> "$GITHUB_OUTPUT"
# else
# echo "tag=$tag" >> "$GITHUB_OUTPUT"
# fi
# - name: Calculate Tag
# id: tag_version
# uses: mathieudutour/github-tag-action@v6.2
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# tag_prefix : ""
# custom_tag : ${{ steps.retag.outputs.tag }}
# - name: Create GitHub Release
# uses: actions/create-release@v1
# id: create_release
# with:
# tag_name: ${{ steps.tag_version.outputs.new_tag }}
# release_name: Release ${{ steps.tag_version.outputs.new_tag }}
# draft: true
# body: ${{ steps.tag_version.outputs.changelog }}
# prerelease: ${{ inputs.release_candidate }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - 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: ./release_notes.txt # asset_path: ./output/spearhead.lua
# asset_name: release_notes.txt # asset_name: spearhead.lua
# asset_content_type: text/plain # asset_content_type: application/octet-stream