Skip to content

Release periodically #134

Release periodically

Release periodically #134

# ======================================
# WARNING!
# THIS FILE IS GENERATED FROM A TEMPLATE
# DO NOT EDIT THIS FILE MANUALLY!
# ======================================
# The template is located in: release-periodically.yml.j2
name: Release periodically
# Create a GitHub release on schedule
# This only makes a tag and pushes it, which is then picked up by another action that builds
# the tarball and posts the actual release entity/page with it. See: tag-release.yml
# If the branch already has a tag at the last commit, there is nothing to release, so abort.
on:
workflow_dispatch:
schedule:
- cron: 48 4 * * TUE
# GH workers run on UTC+0 time. The timing is so that the draft can be reviewed at start of
# work day in Brno which is in UTC+1 or UTC+2.
# Tuesdays are the traditional rawhide anaconda release day, so that there are enough days to
# unbreak things.
permissions:
contents: write
jobs:
make-release-tag:
# Don't run scheduled workflows on forks.
if: github.event_name != 'schedule' || github.repository == 'rhinstaller/anaconda'
runs-on: ubuntu-latest
environment: releases
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
ref: "master"
fetch-depth: 0
token: ${{ secrets.INSTALLKER_TOKEN }}
- name: Check if already tagged
id: check-tag
run: |
# expected retvals and outputs for `git describe`:
# 128 -> fatal: no tag exactly matches 'c88a1272ffbc002042fd62ed409734c1c150cc5f'
# 0 -> anaconda-38.6-1
if git describe --tags --exact-match ; then
echo "::warning:: Already tagged at HEAD, will not push a release commit."
else
echo "can_bump_version=true" >> $GITHUB_OUTPUT
fi
- name: Prepare and tag a release commit
if: steps.check-tag.outputs.can_bump_version
run: |
git config user.name github-actions
git config user.email [email protected]
./scripts/makebumpver -c
- name: Push the release commit with the tag to repo
if: steps.check-tag.outputs.can_bump_version
# the repo should have an access token from the checkout action
# https://github.com/actions/checkout#Push-a-commit-using-the-built-in-token
run: |
git push --tags origin master
# This only makes a tag and pushes it, which is then picked up by another action that builds
# the tarball and posts the actual release entity/page with it.
#
# See: tag-release.yml