Build & Create Release PR #11
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: Build & Release | |
on: | |
workflow_dispatch: | |
# Inputs the workflow accepts. | |
inputs: | |
version: | |
description: 'Release version' | |
required: true | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
build-and-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout repository" | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: | | |
npm ci | |
- name: Build package | |
run: | | |
npm run build | |
- name: Push new build | |
uses: EndBug/add-and-commit@a3adef035a1381dcf888c90b847240e2ddb9e008 | |
with: | |
author_name: Link- | |
author_email: [email protected] | |
message: 'Update build' | |
add: 'bin/starred_search' | |
branch: ${{ github.event.inputs.version }} | |
push: false | |
- name: Update version | |
run: | | |
npm version ${{ github.event.inputs.version }} | |
- name: Push package.json | |
uses: EndBug/add-and-commit@a3adef035a1381dcf888c90b847240e2ddb9e008 | |
with: | |
author_name: Link- | |
author_email: [email protected] | |
message: 'Update version' | |
add: 'package.json' | |
new_branch: ${{ github.event.inputs.version }} | |
push: false | |
- name: Create PR | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: 'Release ${{ github.event.inputs.version }}' | |
title: 'Release ${{ github.event.inputs.version }}' | |
branch: ${{ github.event.inputs.version }} | |
delete-branch: true | |
labels: | | |
release | |
ignore-for-release | |
reviewers: 'Link-' | |
assignees: 'Link-' | |
draft: false |