Skip to content

Annual Release

Annual Release #1

Workflow file for this run

name: Annual Release
on:
schedule:
# Schedule to run at midnight on quarterly basis
- cron: '0 0 30 3,6,9,12 *'
jobs:
create-release:
runs-on: ubuntu-latest
steps:
# Checkout your repository
- name: Checkout repo
uses: actions/checkout@v3
# Set up Git user
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Create a tag for the release
- name: Create Tag
run: |
RELEASE="$(date +"%Y").$(date +"%m")"
echo "RELEASE=$RELEASE" >> $GITHUB_ENV
git tag -a $RELEASE -m "Automatic release $RELEASE"
git push origin release-$RELEASE
# Create a GitHub Release
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "${{ env.RELEASE }}"
release_name: "Automatic Release ${{ env.RELEASE }}"
draft: false
prerelease: false
body: "${{ env.RELEASE }} release of the R-Ladies guide."