Skip to content

trigger build [ci build] #126

trigger build [ci build]

trigger build [ci build] #126

# -*- mode: yaml -*-
name: Tag new version
on:
push:
branches:
- master
jobs:
bump-and-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Parse commit message for bump type
run: |
if ${{ contains(github.event.head_commit.message, '[bump patch]') || contains(github.event.head_commit.message, '[ci build]') }}; then
echo "bump=patch" >> $GITHUB_ENV
elif ${{ contains(github.event.head_commit.message, '[bump minor]') }}; then
echo "bump=minor" >> $GITHUB_ENV
elif ${{ contains(github.event.head_commit.message, '[bump major]') }}; then
echo "bump=major" >> $GITHUB_ENV
fi
- name: Bump and tag new version
if: ${{ env.bump }}
run: |
git config --global user.email "eman.github@gmail.com"
git config --global user.name "eman-bot"
python ./utils/tag_new_version.py --bump ${{ env.bump }}
- name: Trigger eman dev
if: ${{ env.bump }}
uses: actions/github-script@v6
with:
github-token: ${{ secrets.EMAN_DEV_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'cryoem',
repo: 'eman-feedstock',
workflow_id: 'update-version.yml',
ref: 'master',
inputs: {new_version: process.env.new_version }
})