Skip to content

Update Package Version #2

Update Package Version

Update Package Version #2

Workflow file for this run

name: Update Package Version
# Version: 1.0.0
# Modified: No
# Requirements:
# - A valid package.json
# - The `Homey Github Actions Bot` should have `Admin` level access to the repository,
# to bypass push restrictions.
#
# Required secrets:
# - HOMEY_GITHUB_ACTIONS_BOT_PERSONAL_ACCESS_TOKEN
on:
workflow_dispatch:
branches:
- master
inputs:
newversion:
type: choice
description: New Version
required: true
default: patch
options:
- major
- minor
- patch
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout git repository
uses: actions/checkout@v3
with:
token: ${{ secrets.HOMEY_GITHUB_ACTIONS_BOT_PERSONAL_ACCESS_TOKEN }}
- name: Set up node 16 environment
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://npm.pkg.github.com'
- name: Version
run: |
git config --local user.email "[email protected]"
git config --local user.name "Homey Github Actions Bot"
git pull
npm version ${{ github.event.inputs.newversion }}
git push --follow-tags