mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 02:31:45 +01:00
ci: fix codeql triggers and release notes (#736)
This commit is contained in:
46
.github/workflows/build.yml
vendored
46
.github/workflows/build.yml
vendored
@@ -445,17 +445,7 @@ jobs:
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
- name: "Delete previous '${{ steps.release.outputs.name }}' release"
|
- name: "Generate release notes"
|
||||||
if: steps.release.outputs.name && steps.release.outputs.name != ''
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
RELEASE_NAME: ${{ steps.release.outputs.name }}
|
|
||||||
# https://cli.github.com/manual/gh_release_delete
|
|
||||||
run: |
|
|
||||||
GH_DEBUG=1 gh release delete "$RELEASE_NAME" --yes --cleanup-tag || true
|
|
||||||
|
|
||||||
|
|
||||||
- name: "Create '${{ steps.release.outputs.name }}' Release"
|
|
||||||
if: steps.release.outputs.name && steps.release.outputs.name != ''
|
if: steps.release.outputs.name && steps.release.outputs.name != ''
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -474,14 +464,44 @@ jobs:
|
|||||||
The developers assume no liability for any damages or legal consequences.
|
The developers assume no liability for any damages or legal consequences.
|
||||||
Use is at your own risk. Any unlawful use is strictly prohibited.</p>
|
Use is at your own risk. Any unlawful use is strictly prohibited.</p>
|
||||||
|
|
||||||
|
run: |
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
PREVIOUS_TAG=$(gh release view "$RELEASE_NAME" --json tagName --jq '.tagName' 2>/dev/null || true)
|
||||||
|
|
||||||
|
ARGS=(-X POST "repos/${GITHUB_REPOSITORY}/releases/generate-notes" -f tag_name="$RELEASE_NAME" -f target_commitish="$GITHUB_SHA")
|
||||||
|
if [[ -n "${PREVIOUS_TAG:-}" ]]; then
|
||||||
|
ARGS+=(-f previous_tag_name="$PREVIOUS_TAG")
|
||||||
|
fi
|
||||||
|
|
||||||
|
gh api "${ARGS[@]}" --jq '.body' > release-notes.md
|
||||||
|
|
||||||
|
printf "\n%s\n" "$LEGAL_NOTICE" >> release-notes.md
|
||||||
|
|
||||||
|
|
||||||
|
- name: "Delete previous '${{ steps.release.outputs.name }}' release"
|
||||||
|
if: steps.release.outputs.name && steps.release.outputs.name != ''
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
RELEASE_NAME: ${{ steps.release.outputs.name }}
|
||||||
|
# https://cli.github.com/manual/gh_release_delete
|
||||||
|
run: |
|
||||||
|
GH_DEBUG=1 gh release delete "$RELEASE_NAME" --yes --cleanup-tag || true
|
||||||
|
|
||||||
|
|
||||||
|
- name: "Create '${{ steps.release.outputs.name }}' Release"
|
||||||
|
if: steps.release.outputs.name && steps.release.outputs.name != ''
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
RELEASE_NAME: ${{ steps.release.outputs.name }}
|
||||||
|
|
||||||
# https://cli.github.com/manual/gh_release_create
|
# https://cli.github.com/manual/gh_release_create
|
||||||
run: |
|
run: |
|
||||||
GH_DEBUG=1 gh release create "$RELEASE_NAME" \
|
GH_DEBUG=1 gh release create "$RELEASE_NAME" \
|
||||||
--title "$RELEASE_NAME" \
|
--title "$RELEASE_NAME" \
|
||||||
${{ steps.release.outputs.name == 'latest' && '--latest' || '' }} \
|
${{ steps.release.outputs.name == 'latest' && '--latest' || '' }} \
|
||||||
${{ steps.release.outputs.name == 'preview' && '--prerelease' || '' }} \
|
${{ steps.release.outputs.name == 'preview' && '--prerelease' || '' }} \
|
||||||
--generate-notes \
|
--notes-file release-notes.md \
|
||||||
--notes "$LEGAL_NOTICE" \
|
|
||||||
--target "${{ github.sha }}" \
|
--target "${{ github.sha }}" \
|
||||||
kleinanzeigen-bot-darwin-amd64 \
|
kleinanzeigen-bot-darwin-amd64 \
|
||||||
kleinanzeigen-bot-darwin-arm64 \
|
kleinanzeigen-bot-darwin-arm64 \
|
||||||
|
|||||||
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@@ -10,7 +10,7 @@ on: # https://docs.github.com/en/actions/reference/workflows-and-actions/events
|
|||||||
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#schedule
|
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#schedule
|
||||||
- cron: '10 10 * * 1' # Mondays 10:10 UTC
|
- cron: '10 10 * * 1' # Mondays 10:10 UTC
|
||||||
push:
|
push:
|
||||||
branches: ['**'] # build all branches
|
branches: ['main', 'release'] # run only on protected branches to avoid duplicate PR runs
|
||||||
tags-ignore: ['**'] # don't build tags
|
tags-ignore: ['**'] # don't build tags
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**/*.md'
|
- '**/*.md'
|
||||||
|
|||||||
Reference in New Issue
Block a user