mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 06:00:46 -05:00
Bumps the actions-minor-patch group with 3 updates in the / directory: [docker/login-action](https://github.com/docker/login-action), [actions/setup-python](https://github.com/actions/setup-python) and [actions/setup-java](https://github.com/actions/setup-java). Updates `docker/login-action` from 4.6.0 to 4.7.0 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/dbcb813823bdd20940b903addbd779551569679f...81c6f93d4bc991e510b342a00b419b3bb4efc5c6) Updates `actions/setup-python` from 7.0.0 to 7.1.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/5fda3b95a4ea91299a34e894583c3862153e4b97...6d4fd22b20465ccc0f7354476588e8df7c9ca0e0) Updates `actions/setup-java` from 6.0.1 to 6.1.0 - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/de7274f081f381c8f8158605e0321c36c376e2e6...b843ebf9b913146b38da2eaa7aeddf76074ae1ad) --- updated-dependencies: - dependency-name: docker/login-action dependency-version: 4.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions-minor-patch - dependency-name: actions/setup-python dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions-minor-patch - dependency-name: actions/setup-java dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions-minor-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
107 lines
3.9 KiB
YAML
107 lines
3.9 KiB
YAML
name: Release Cut
|
|
|
|
# One-button release from main.
|
|
#
|
|
# On dispatch or cron: semantic-release analyzes the Conventional Commits on
|
|
# main, bumps pom.xml (via the exec plugin running `mvn versions:set`), writes
|
|
# CHANGELOG.md, commits those files, tags the release (tagFormat: ${version}),
|
|
# and creates the GitHub Release. The tag push then fires release.yml exactly
|
|
# as a manual tag push does today.
|
|
#
|
|
# GH_TOKEN must be a fine-grained PAT with contents:write. The default
|
|
# GITHUB_TOKEN cannot be used: tags pushed with it do not trigger other
|
|
# workflows (GitHub's recursion guard), so release.yml would never run.
|
|
#
|
|
# Maven note: the exec plugin invokes `mvn versions:set`; ubuntu-latest ships
|
|
# a system mvn, which is sufficient for that goal.
|
|
#
|
|
# The toolchain is pinned: .github/release-tooling/package-lock.json is the
|
|
# only source of the semantic-release dependency tree (npm ci --ignore-scripts),
|
|
# so the job that holds the write PAT never resolves mutable versions.
|
|
#
|
|
# Required secrets: GH_TOKEN
|
|
|
|
on:
|
|
# 00:30 America/Chicago on the 15th and on the last day of the month.
|
|
# GitHub applies the timezone, DST included. Cron cannot express "last day
|
|
# of the month", so it fires on 28-31 and the gate job keeps the real one.
|
|
schedule:
|
|
- cron: '30 0 15,28-31 * *'
|
|
timezone: America/Chicago
|
|
workflow_dispatch:
|
|
inputs:
|
|
dry-run:
|
|
description: 'Dry run (compute the next version and release notes without releasing)'
|
|
type: boolean
|
|
default: false
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
gate:
|
|
name: Check release window
|
|
runs-on: ubuntu-latest
|
|
permissions: {}
|
|
outputs:
|
|
cut: ${{ steps.window.outputs.cut }}
|
|
steps:
|
|
- id: window
|
|
env:
|
|
EVENT: ${{ github.event_name }}
|
|
run: |
|
|
if [ "$EVENT" = "workflow_dispatch" ]; then
|
|
echo "cut=true" >> "$GITHUB_OUTPUT"; exit 0
|
|
fi
|
|
export TZ=America/Chicago
|
|
if [ "$(date +%d)" = "15" ] || [ "$(date -d tomorrow +%d)" = "01" ]; then
|
|
echo "cut=true" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "$(date +%F) is neither the 15th nor the last day of the month; skipping."
|
|
fi
|
|
|
|
release:
|
|
name: Cut release from main
|
|
needs: gate
|
|
if: needs.gate.outputs.cut == 'true'
|
|
runs-on: ubuntu-latest
|
|
# Serialize release cuts: a second dispatch queues behind the first instead
|
|
# of racing it to the same version/tag. No cancel-in-progress: never kill a
|
|
# mid-flight release. GitHub keeps at most ONE pending run per group, so if
|
|
# several dispatches pile up, only the latest pending one runs. That is
|
|
# intentional: duplicate queued release cuts are redundant by definition
|
|
# (the surviving run re-analyzes main and releases whatever is unreleased).
|
|
#
|
|
# Job-level, not workflow-level, so the scheduled runs the gate skips
|
|
# never take or replace the one pending slot in this group.
|
|
concurrency:
|
|
group: release-cut
|
|
# semantic-release comments on and labels every issue and PR in the release,
|
|
# which is roughly two API writes each. A 278-PR release took ~22 minutes.
|
|
timeout-minutes: 60
|
|
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
ref: main
|
|
token: ${{ secrets.GH_TOKEN }}
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
|
|
with:
|
|
java-version: '25'
|
|
distribution: 'temurin'
|
|
cache: maven
|
|
|
|
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Install the pinned release toolchain
|
|
run: npm ci --prefix .github/release-tooling --ignore-scripts
|
|
|
|
- name: Run semantic-release
|
|
run: ./.github/release-tooling/node_modules/.bin/semantic-release ${{ inputs.dry-run && '--dry-run' || '' }}
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|