Skip to content

Build & Create Release PR #7

Build & Create Release PR

Build & Create Release PR #7

Workflow file for this run

name: Build & Release
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
version:
description: 'Release version'
required: true
permissions:
contents: 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'
- 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'
- name: Tag version
run: |
git tag ${{ github.event.inputs.version }}
- name: Push tag
uses: EndBug/add-and-commit@a3adef035a1381dcf888c90b847240e2ddb9e008
with:
author_name: Link-
author_email: [email protected]
- uses: actions/create-release@master
name: Create ${{ github.event.inputs.version }} Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "${{ github.event.inputs.version }}"
release_name: "${{ github.event.inputs.version }}"
- name: Release
uses: JS-DevTools/npm-publish@0f451a94170d1699fd50710966d48fb26194d939
with:
token: ${{ secrets.NPM_TOKEN }}