Skip to content

Bundle all cron-related commands #95

Bundle all cron-related commands

Bundle all cron-related commands #95

Workflow file for this run

# This workflow handles creating and publishing a GitHub release
name: Publish release
on:
# Trigger workflow when a release branch (minor-release, major-release, or patch) has been created
# More information on how we handle RicePilaf releases here:
# https://github.com/bioinfodlsu/rice-pilaf/wiki/3.2.-Contribution-and-Release-Workflow#2%EF%B8%8F%E2%83%A3-release-workflow
push:
branches: [minor-release, major-release, patch]
jobs:
# Push the release to the main branch:
# https://github.com/google/mirror-branch-action
mirror-release-to-main:
name: Mirror release branch to main branch
runs-on: ubuntu-latest
steps:
- name: Mirror action step
id: mirror
uses: google/mirror-branch-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
source: ${{ github.ref_name }}
dest: "main"
# Create and publish the release:
# This job uses a modified version of this workflow: https://github.com/rymndhng/release-on-push-action
# - Modified version here: https://github.com/memgonzales/release-on-push-action
# - This modified version removes the commit-based changelog and release version number in the release notes
release-on-push:
needs: mirror-release-to-main
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_BODY: "Welcome! RicePilaf is short for Rice Post-GWAS/QTL Analysis dashboard. Ok, so we are not great at acronyms; but like a flavorful rice pilaf that combines many ingredients, this RicePilaf combines information from multiple rice databases to provide insights into your QTL/GWAS loci.\n\n ## Installation and Usage \nPlease visit the [wiki](https://github.com/bioinfodlsu/rice-pilaf/wiki).\n\n ## Changelog\n"
steps:
- uses: memgonzales/release-on-push-action@master
if: ${{ github.ref == 'refs/heads/minor-release' }}
with:
bump_version_scheme: minor
release_body: ${{ env.RELEASE_BODY }}
- uses: memgonzales/release-on-push-action@master
if: ${{ github.ref == 'refs/heads/major-release' }}
with:
bump_version_scheme: major
release_body: ${{ env.RELEASE_BODY }}
- uses: memgonzales/release-on-push-action@master
if: ${{ github.ref == 'refs/heads/patch' }}
with:
bump_version_scheme: patch
release_body: ${{ env.RELEASE_BODY }}
# Delete the release branch
delete-release-branch:
needs: release-on-push
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: dawidd6/action-delete-branch@v3
with:
branches: ${{ github.ref_name }}