Created
March 25, 2021 13:06
-
-
Save jeremyckahn/e4c866a4c31674355cb74633df7ec485 to your computer and use it in GitHub Desktop.
Draft of a GitHub Action for Farmhand
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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