Release Next #5
Workflow file for this run
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
name: Release Next | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'The source branch to build. Default master.' | |
default: master | |
required: true | |
releaseBranch: | |
description: 'The release branch to commit to. Default next.' | |
default: next | |
required: true | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.inputs.branch }} | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
cache: npm | |
- name: Install | |
run: npm ci --prefer-offline | |
- name: Lint | |
run: npm run lint | |
- name: Build | |
run: npm run build | |
- name: Test | |
run: npm test | |
- name: Remove dev dependencies | |
run: npm install --omit dev --prefer-offline | |
- name: Commit | |
uses: endbug/add-and-commit@45a4ede867982d5d85997a82529b1d9dd0328e7f | |
with: | |
add: 'build node_modules --force' | |
branch: ${{ github.event.inputs.releaseBranch }} | |
message: 'Add build output' | |
pull: 'NO-PULL' | |
push: 'origin ${{ github.event.inputs.releaseBranch }} --force' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Reinstall dev dependencies | |
run: npm install --prefer-offline |