Skip to content

Instantly share code, notes, and snippets.

@jeremyckahn
Created March 25, 2021 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremyckahn/e4c866a4c31674355cb74633df7ec485 to your computer and use it in GitHub Desktop.
Save jeremyckahn/e4c866a4c31674355cb74633df7ec485 to your computer and use it in GitHub Desktop.
Draft of a GitHub Action for Farmhand
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
on:
workflow_dispatch:
inputs:
releaseType:
description: 'Release type'
required: true
default: 'patch'
jobs:
triggerRelease:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.1
with:
fetch-depth: 0
- uses: fregante/setup-git-user@v1
- uses: actions/setup-node@v1
with:
node-version: 14
# Set up both stable branches for the release:* scripts
- run: git checkout -b master --track origin/master
- run: git checkout develop
- run: npm ci
- run: npm run release:${{ github.event.inputs.releaseType }}
# Trigger downstream workflows
# https://github.community/t/push-from-action-does-not-trigger-subsequent-action/16854/2
- name: Trigger deployment
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.PAT }}
tags: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment