-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (50 loc) · 1.71 KB
/
Copy pathrelease.yml
File metadata and controls
54 lines (50 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Release
on:
workflow_dispatch:
schedule:
# Every Monday at 8 AM EST (1 PM UTC). GitHub Actions runs in UTC;
# adjust for DST if needed (EDT = UTC-4).
- cron: '0 13 * * 1'
jobs:
release:
name: Semantic Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
outputs:
released: ${{ steps.release.outputs.released }}
version: ${{ steps.release.outputs.version }}
tag: ${{ steps.release.outputs.tag }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@v10.5.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
config_file: releaserc.toml
verbosity: 1
# Build and publish ghcr.io/chutch3/kenku:<version> + :latest, but only when a
# new version was actually released.
#
# Recovery: every stage is idempotent. If Semantic Release fails before tagging,
# re-run it — it cuts the release as if it were the first attempt (and no-ops if the
# version already exists). If this build fails after the release was cut, "Re-run
# failed jobs" keeps the release job's outputs and rebuilds; or dispatch build.yml
# with the version (e.g. 0.15.0) to (re)build any existing tag at any time.
build-image:
name: Build & Publish Image
needs: release
if: needs.release.outputs.released == 'true'
uses: ./.github/workflows/build.yml
permissions:
contents: read
packages: write
with:
version: ${{ needs.release.outputs.version }}