mirror of
https://github.com/ivuorinen/actions.git
synced 2026-01-26 11:34:00 +00:00
* chore: remove bylines from actions * feat: new daily release action * chore(ci): ignore false positive in codeql, fix others * fix: cr comments
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
---
|
|
name: Release Daily State
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 21 * * *' # 00:00 at Europe/Helsinki
|
|
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
new-daily-release:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
outputs:
|
|
created: ${{ steps.daily-version.outputs.created }}
|
|
version: ${{ steps.daily-version.outputs.version }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@71cf2267d89c5cb81562390fa70a37fa40b1305e # v6-beta
|
|
|
|
- name: Create daily release
|
|
id: daily-version
|
|
run: |
|
|
set -eu
|
|
|
|
VERSION="v$(date '+%Y.%m.%d')"
|
|
printf '%s\n' "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
|
|
# Check if release already exists
|
|
if gh release view "$VERSION" >/dev/null 2>&1; then
|
|
printf '%s\n' "created=false" >> "$GITHUB_OUTPUT"
|
|
printf '%s\n' "Release $VERSION already exists - skipping"
|
|
exit 0
|
|
fi
|
|
|
|
# Create release with auto-generated changelog (also creates tag)
|
|
gh release create "$VERSION" \
|
|
--title "Release $VERSION" \
|
|
--generate-notes \
|
|
--target main
|
|
|
|
printf '%s\n' "created=true" >> "$GITHUB_OUTPUT"
|
|
printf '%s\n' "Created release $VERSION"
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|